Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A more functional command-line calculator' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A more functional command-line calculator
Authored by: CoolerQ on Jul 23, '07 12:00:03AM
My favorite calculator is "units"; it's included with OS X, but you'll want the fink version as the native one is very very old. Some example usage:

maclap01:~ quentins$ units
1948 units, 71 prefixes, 28 functions

You have: cos(0)
You want: 
        Definition: 1
You have: cos(pi)
You want: 
        Definition: -1
You have: 15 miles
You want: meters
        * 24140.16
        / 4.1424746e-05
At the "You want" prompt, it wants you to type in the units to convert to. If you're doing purely numerical calculations, just hit enter. Note that it prints two numbers when doing unit conversion. The number following the * is the answer you want. The number following the / is what the answer would be if you reversed the units; this is in case you make a mistake.

--Quentin



[ Reply to This | # ]