MathGroup Archive 2003

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

Search the Archive

Re: Trigonometric math functions


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.


  • Prev by Date: Re: NotebookFind using Previous or Next *without wrapping*?
  • Next by Date: Re: List manipulation
  • Previous by thread: Re: Trigonometric math functions
  • Next by thread: Unformatted File IO