Search the web
Sign In
New User? Sign Up
asacmug
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.

Messages

  Messages Help
Advanced
Calculator made easy   Message List  
Reply | Forward Message #70 of 160 |

Here's a tip to have a calculator readily avaiable from
the OS X Terminal. If you always have a Terminal window
open, this is easier than using Apple's calculator or even
the Tiger Dashboard:

1) Open a new terminal window

2) Copy/paste the following code. You can add this to
your ~/.profile to make it available in future Terminal
windows.

function calc () {
echo $* | bc -l
}

3) Now you have a calculator always available. Use quotes
if you're using parenthesis. This calculator is also
infinite-precision. See the last example showing pi to
400 digits.

% calc 19.99*1.0825
21.6391

% calc "e(1)"
2.71828182845904523536

% calc "s(0.45)^2+c(0.45)^2"
.99999999999999999997

% calc "scale=400;a(1.0)*4"
3.141592653589793238462643383279502884197169399375105820974944592307\
81640628620899862803482534211706798214808651328230664709384460955058\
22317253594081284811174502841027019385211055596446229489549303819644\
28810975665933446128475648233786783165271201909145648566923460348610\
45432664821339360726024914127372458700660631558817488152092096282925\
40917153643678925903600113305305488204665213841469519415116092


Alex






Fri Feb 4, 2005 3:03 am

"arm4598" <arm4598@...>
arm4598
Offline Offline
Send Email Send Email

Forward
Message #70 of 160 |
Expand Messages Author Sort by Date

Here's a tip to have a calculator readily avaiable from the OS X Terminal. If you always have a Terminal window open, this is easier than using Apple's...
arm4598
Offline Send Email
Feb 4, 2005
3:05 am
Advanced

Copyright © 2007 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help