Re: Simple calculator
On Thu, Aug 06, 1998 at 08:33:03AM +0200, Dr. Michael Meskes wrote:
> Joey Hess wrote:
> > I just use bc:
> >
> > joey@kite:~/lab>which calc
> > calc () {
> > echo $* | bc -l
> > }
>
> That one´s really nice. However, bc cannot do sin(1), can it?
bc seems to actually work if you use it with -l:
MATH LIBRARY
If bc is invoked with the -l option, a math library is
preloaded and the default scale is set to 20. The math
functions will calculate their results to the scale set at
lowing functions:
s (x) The sine of x, x is in radians.
the time of their call. The math library defines the fol
4 * a(1)
3.14159265358979323844
s ( 4 * a(1) )
.00000000000000000002
--
David Welton http://www.efn.org/~davidw
Debian GNU/Linux - www.debian.org
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: