You have found a secret area.

Playing with the Google Calculator

Date/Time Permalink: 03/16/06 03:20:56 am
Category: LINKS and Lists

A little-known fact about Google is the calculator feature. Google can recognize a mathematical expression when typed into the search box and give you the answer as a search result!

We have the vanilla + - * / four-function...which all seem to work in the expected ways, until you try being a smart-aleck and ask it to divide by zero, in which case it's a smart-aleck right back and searches the web for your equation.

xy yields x to the y power. 10100 is a google (a one with 100 zeros after it), so now you can calculate a google on Google.

% is modulus. Yawn.

x choose y...now this is interesting. This returns how many ways there are to choose y items from set x. Famous for being a moderately difficult operation to even express, let alone solve. How many ways are there to draw five cards from a deck of fifty-two? 2,598,960. Now with four ordered royals, the exact odds of getting an ordered royal on the first deal are 4/2,598,960, or 1 in 649,740. And to think I once stayed up *all* *night* writing a program to solve this!

Nth root of X...self-explanatory. 2nd root of 2 is still 1.41421356, with 9th-place truncation for decimals.

Programmers will be happy to know they also have their sqrt(x) function, and sin(x), log(x), arc(x), parenthesis ordering, and blah blah blah...

And finally the "!" function, as in 6! = 720 (if you don't know, this is a factorial equation, the product of all whole numbers from one to the value given). Interesting to note that the highest value of x! Google will compute is a mere 170! Anything higher than that returns a search. Piffle.

Constants are supported. A simple "c=" gets you the speed of light. pi=3.14159265 and *that's* *it*!?!? Gee, thanks, I've frinkin' memorized it *that* far... base conversion, too, but Google wouldn't give me pi in binary, presumably because of the decimals, so to compensate, it of course gave me a link to a site that has it.

It doesn't get any more trivial than this, does it?

Follow me on Twitter for an update every time this blog gets a post.
Stumble it Reddit this share on Facebook

suddenly the moon