Friday, November 09, 2007

Google Does the Math

A colleague pointed out that Google has a very interesting "free form" calculator capability built into its search engine. While it can do obvious things like 33+sqrt(15), the really cool thing is its support for units and dimensions, allowing you to mix and match lbf (pounds-force) and newtons, even feet, meters, parsecs, and furlongs.

It also knows many constants like c (speed of light), G (the gravitational constant), and g (acceleration of gravity for Earth), so you can enter things like g-G*(5.9742E24 kg)/(3959 miles)^2 in m/s^2 which compares the stored value of g to a calculated value from the Earth's mass (kg) and radius (in miles just to show the use of mixed units). Or how about (5.9742E24 kg)* c^2 in BTU, applying Einstein's most famous equation to find that 5.09 x 10^38 BTU's would be released if the Earth's mass were completely converted to energy, perhaps in a collision with an anti-Earth. Complete instructions are here (for the calculator, not for converting the Earth's mass to energy). I wish there were a list of the supported units and constants - I tried various combinations for energy in kilowatt-hours until I found that kWh works (that's 1.49 x 10^35 kWh for you Earth annihilators who prefer electric bill units).

Update: I should have done a Google search on Google calculator units! I just did, and this article has all the details on supported units and physical constants. It also reveals that I could have inserted planetary masses and radii directly by using m_earth, m_sun, r_mars, etc., so my formulas above could be g-G*(m_earth)/(r_earth)^2 in m/s^2 and m_earth*c^2 in kWh.

No comments: