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: lar3ry on Jul 09, '07 10:00:39AM
BC has support for cosine, sine, etc. Just use the "-l" option to the BC command. RTFM(an)P(age)...


lar3ry@beth> lar3ry $ bc -l
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
c(0) /* cosine of 0 radians */
1.00000000000000000000
s(0) /* sine of 0 radians */
0
a(1) /* artangent of 1 (pi/4) */
.78539816339744830961
scale=100; 4 * a(1) /* pi to 100 decimal places */
3.141592653589793238462643383279502884197169399375105820974944592307\
8164062862089986280348253421170676
lar3ry@beth> lar3ry $


[ Reply to This | # ]
Um...
Authored by: SeanAhern on Jul 09, '07 10:51:51AM

Um...he mentioned in the posting that he knows about "bc -l". His problem was that it didn't have constants built in; you'd have to do formulas to get them.



[ Reply to This | # ]