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

10.5: Spotlight calculator supports math(3) functions Apps
It's well-known that Spotlight now sports an integrated calculator. But I haven't seen anyone yet mention that it supports all of the standard C math(3) functions. For example, type sqrt(9), and you'll get an answer of 3. Type pow(2,2), and you'll get 4. You can type man math in Terminal to get a list of available math functions.

[robg adds: The Spotlight calculator also supports pi as a constant (and there may be others, but that's the only one I'm aware of).]
    •    
  • Currently 2.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[13,284 views]  

10.5: Spotlight calculator supports math(3) functions | 3 comments | Create New Account
Click here to return to the '10.5: Spotlight calculator supports math(3) functions' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Spotlight calculator supports math(3) functions
Authored by: nathanst on Nov 06, '07 03:59:04PM

Be careful, in that the calculator sometimes rounds off in odd ways.

Try, for instance, 16! Then launch calculator and make the same computation.

Or, try 16!-1.



[ Reply to This | # ]
10.5: Spotlight calculator supports math(3) functions
Authored by: lbundle on Nov 10, '07 06:42:14PM

In this case Spotlight is wrong on 16!. I have no idea why.



[ Reply to This | # ]
10.5: Spotlight calculator supports math(3) functions
Authored by: lbundle on Nov 10, '07 06:39:57PM

No it doesn't. It supports something else.

For example log(2) return log base-10 which is not how math(3) defines in. Also there are lots of missing things, e.g. log2, log1p etc...

Thank $Deity it does not use degrees in computing sin, cosine etc..



[ Reply to This | # ]