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


Click here to return to the 'two other calculators' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
two other calculators
Authored by: Anonymous on Feb 25, '02 10:29:18PM

There are two other calculators that come with OS X. bc is an infix calculator, and dc is a postfix calculator.

bc - looks "normal"

dc - works like an HP calculator



[ Reply to This | # ]
two other calculators, but...
Authored by: juanfc on Feb 27, '02 06:27:52AM
Thanks a lot for the notes about bc and dc. These are very serious calculators... I think I met with them some time ago. I am surprised specially with the ability of managing arbitrary long precition arithmetic.
  echo "scale=500; 4*a(1)" | bc -l  
shows to you 3.14.... with 500 digits!! (although a bit slow!). But my original idea stands, since I want only calcs like
 tc 2 2 
or
 % tc 2+sin 3 
that gives directly
 2+sin(3) = 2.14112000806  


[ Reply to This | # ]
two other calculators
Authored by: danmccomb on Mar 05, '02 11:38:13PM

An easy way to do quick math at the command line is simply type "echo 2+3 | bc" replacing 2+3 with your own math expression.

That way you can feed the string into bc and you'll get "4" back as standard output.



[ Reply to This | # ]