Subject: Re: bc (1)
To: None <banshee@gabriella.resort.com>
From: Phil Nelson <phil@cs.wwu.edu>
List: current-users
Date: 06/21/1996 10:19:15
>does someone familiar with this utility know why it chooses to recode
>series approximations for sin(), cos(), atan() rather than calling the
>(hopefully) functional and accurate library ones?
>
>i was just grousing that it lacks acos() and asin(), and was slightly 
>horrified to see what its doing.

yes, I know. :)  bc is an arbitrary precision calculator language.
Therefore, one must implement arbitrary precision versions of the
trig functions.  For example, using the C library one would not get
accurate results for:

  scale = 200;  4*a(1);

(which, by the way, prints the first 200 digits after the decimal
point of PI.)

If you write a faster algorithm for computing them accurately to
an arbitrary precision, or write acos() and asin(), please send them
to me.  I'll include them in the next version of GNU bc.

-- 
Phil Nelson                       NetBSD: http://www.netbsd.org
e-mail: phil@cs.wwu.edu           LPF: http://www.lpf.org
http://www.cs.wwu.edu/~phil       !gifs: http://www.lpf.org/Patent/Gif/Gif.html