From: Mad Mountain
Subject: recursive form of sin function
Date: 
Message-ID: <_b_D6.693$Uc2.157206@news.uswest.net>
Gentlemen:

Would it be possible to write the sin (x) function from a taylor series
expansion as a recursive algorithm.  I t seems that is would be possabe
because it can be broken into two parts:

Sin (X) = X  -( (X^3/3!)+Sum(X^(n+4)/(n+4)!) +((X^5/5!)+Sum(X^(k+4)/(k+4)!)
where n is 3 and k is 5.

 I may not be writing this correctly in that the negative (n) component
parts are 3, 7,11,15, . and the positive (k) components are 5, 9,  13, 17.

Any help or suggestion would be appreciated as I would like to instantiate
this into a FPGA./

Respectfully submitted:

kelly
From: Marc Battyani
Subject: Re: recursive form of sin function
Date: 
Message-ID: <9bq1oh$pr5$1@reader1.fr.uu.net>
"Mad Mountain" <···········@favorites.com> wrote

> Would it be possible to write the sin (x) function from a taylor series
> expansion as a recursive algorithm.  I t seems that is would be possabe
> because it can be broken into two parts:
>
> Sin (X) = X  -( (X^3/3!)+Sum(X^(n+4)/(n+4)!)
+((X^5/5!)+Sum(X^(k+4)/(k+4)!)
> where n is 3 and k is 5.
>
>  I may not be writing this correctly in that the negative (n) component
> parts are 3, 7,11,15, . and the positive (k) components are 5, 9,  13, 17.
>
> Any help or suggestion would be appreciated as I would like to instantiate
> this into a FPGA./

Sure you don't want it in VHDL?
In a FPGA or ASIC the sin and cos functions are generally computed with the
CORDIC algorithm.
see http://cnmat.cnmat.berkeley.edu/~norbert/cordic/node4.html to look at
how to use it to compute a sin(x).
You can even use bit serial maths to compute it.

You should look at CORDIC algorithm in google if you want more info.
comp.arch.fpga or comp.lang.vhdl could be better groups for these subjects
even though several people (like me) do both Lisp and VHDL.

Marc