Re: Trigonometric math functions

*To*: mathgroup at smc.vnet.net*Subject*: [mg44586] Re: Trigonometric math functions*From*: drbob at bigfoot.com (Bobby R. Treat)*Date*: Sat, 15 Nov 2003 02:05:14 -0500 (EST)*References*: <boig47$og2$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Here's a much better Pade approximation, if you're willing to build a little more complexity into your function (including a square root). It eliminates the vertical at x==1, and that helps a lot. << "Calculus`Pade`" << "Graphics`Colors`" rootPade = Sqrt[1 - x^2]*Pade[ArcCos[x]/Sqrt[1 - x^2], {x, 0, 6, 6}] Plot[Evaluate[rootPade - ArcCos[x]], {x, 0, 1}, PlotStyle -> {Red, Blue, Black}, PlotRange -> All] There's a temptation to use Simplify when defining rootPade. But if you do, the result isn't as robust numerically: rootPade = Simplify[Sqrt[1 - x^2]* Pade[ArcCos[x]/Sqrt[1 - x^2], {x, 0, 6, 6}]] Plot[Evaluate[rootPade - ArcCos[x]], {x, 0, 1}, PlotStyle -> {Red, Blue, Black}, PlotRange -> All] Bobby "Bruno" <bpa at BPASoftware.com> wrote in message news:<boig47$og2$1 at smc.vnet.net>... > Hi all, > > I would like to implement an arc cos function on a 16 bits µcontroller > (optimized sin() and cos() function are welcome). > > Does someone have some sources or an algorythm in this way ? > > Thanks in advance, > > Regards.