MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: implementation of cos,sin,tan,etc.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg3927] Re: implementation of cos,sin,tan,etc.
  • From: fateman at peoplesparc.cs.berkeley.edu (Richard J. Fateman)
  • Date: Fri, 10 May 1996 03:29:13 -0400
  • Organization: University of California, Berkeley
  • Sender: owner-wri-mathgroup at wolfram.com

In article <4m7qed$k5h at dragonfly.wolfram.com>,
Nicholas S Fogelson <nfogelso at ix.cs.uoregon.edu> wrote:
>
>Does anyone know exactly how MM calculates cos,sin,etc. 

Presumably someone does

 I know that its
>not by expansion of a Taylor series because it makes the answer too
>darn fast to be doing that (ie - if you went through the taylor calculation
>of sin1000000 it would take quite a few seconds before it started outputting.
>Just doing sin1000000 will cause instant output).

Most likely it IS done by Taylor series, but after reducing the argument
to a region near zero  (e.g. -pi/4 to pi/4 )  You need to have a
way of computing pi to arbitrary precision, not a big deal.


>I know that the MM implementations are not public, but I thought maybe
>somebody knows this anyway. 

bigfloat implementations of elementary functions are  described in
various places.  

>Also - does anyone know how an HP calculator does these calculations?
>Is is the same way?

No.
Cordic transformations, I believe.  Look it up..



>--
>Nicholas Fogelson
>University of Oregon
>Department of Computer and Information Science
>nfogelso at cs.uoregon.edu  (503)683-7885
>
>
>


-- 
Richard J. Fateman
fateman at cs.berkeley.edu   http://http.cs.berkeley.edu/~fateman/

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: how to draw the contour lines on a surface
  • Next by Date: multinomials: a programming question
  • Previous by thread: implementation of cos,sin,tan,etc.
  • Next by thread: Eulers PSI and PHI interchanged in Guide Std MMa Pkg