Re: A92: Floating-point Support


[Prev][Next][Index][Thread]

Re: A92: Floating-point Support




>Well, if you impliment all that stuff division and multiplication and
>stuff...you should know that trig is pretty easy with a power series.  For
>instance, for sin(x), you need x in radians, and it would probably be best to
>reduce it to + or - 2pi or so.  Then you can approximate sin(x) with: x
>-x^3/3! + x^5/5! - x^7/7! ... it gives a very close approximation after adding
>only a few terms (seven terms or so would probably be good) try it out on a
>calculator, see how close it gets you.  If you like it, and you write those
>routines, there's also a power series for cos(x).  I don't think it would work
>well for tan(x) though.  Anyhow, sin(x) and cos(x) would be good for start on
>trig, once you have the basic addition, subtraction, multiplication and
>division implimented.

you can use the 92 to generate taylor series poly's for this.  Just type
taylor(sin(x),7) and it'll spit a 7th order taylor at you.

Ritchie



References: