Weirdness with Google Calculator

Google Calculator snafu

Google Calculator is pretty nifty, and able to handle some rather complex high-level (i.e. English-like) syntax. For example, it handles 1.190 CAD per litre in USD per gallon quite nicely, to let you figure out just how much that tank of gas you bought this afternoon cost (the answer, if you can’t be arsed to click on the link, is about USD$4.55—that’s what you get for having high oil prices combined with the recent woes of Alberta oil companies), compared with what they’re paying in the States (more than a dollar less, on average, per gallon). And Google Calculator is pretty awesome for this sort of thing.

But try stringing together several conversions, and even though it gets the parentheses right, it still utterly fails. The calculation 1.19 CAD per litre per 16 litres should parse as 1.19 $/L x 16 L, which reduces to $(1.19 x 16), but the calculator fails utterly on the calculation. Just look at the ridiculous answer: 75,111.0894 USD/metres to the sixth power! U.S. dollars weren’t even mentioned, and metres to the sixth power?? Now I truly understand what they mean by ‘a higher plane of existence’.

Tags: , , , , , ,

I think Google is not totally crazy here. You’re using per to mean both / and *, which clearly isn’t going to work.

Perhaps so, but Google is still crazy, and I don’t think it’s as simple as a literal translation of ‘per’ into one operation. Where did those crazy units come from? Where did that huge honkin’ integer come from? It parsed the expression correctly as far as parentheses, but it failed at some point after that, and I don’t think it was in a dictionary lookup.