sin computation



Jan Mueller wrote:
> Hi,
> I am just writing an article about how pocket calculators compute values of
trigonometric functions (especially Volders CORDIC algorithm). I also
contacted Casio and TI about it but they gave no information because of
company secrets. Could anyone explain to me how Maxima solves it? sin would be
sufficient for me
> Jan

Apparently the software for the HP 48 calculator has been written by the
french mathematician B. Parisse from Grenoble, and can be downloaded here:
ftp://ftp-fourier.ujf-grenoble.fr/linux/xcas/hpcas/erablsrc.zip
so you can take a look at it. For the TI calculator it is the software Derive,
i don't think one can get the source code.

Another source for access to trig functions computations is to take a look at
the source code for the libc and libm in free operating systems. For example
for FreeBSD you can take a look at
http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/msun/
but the code for i387 obviously uses hardware nstructions in the processor so
it will ne be very useful to you. But there is a generic computation, for
example for the sin here:
http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/msun/src/k_sin.c?rev=1.11
which shows how one can proceed with approximate formula.


-- 
Michel Talon