Mathematica 9 is now available
Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

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

Search the Archive

Re: Trigonometric math functions

  • To: mathgroup at
  • Subject: [mg44572] Re: Trigonometric math functions
  • From: poujadej at (Jean-Claude Poujade)
  • Date: Fri, 14 Nov 2003 04:43:20 -0500 (EST)
  • References: <boig47$og2$>
  • Sender: owner-wri-mathgroup at

"Bruno" <bpa at> wrote in message news:<boig47$og2$1 at>...
> 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.

(Sorry my previous post was a wrong version ! )

In[1]:=(* Why not simply use a series expansion? *)
In[2]:=(s1=Series[ArcCos[x],{x,0,3}]//Normal )//InputForm
Out[2]//InputForm=Pi/2 - x - x^3/6

Out[3]//InputForm=1 - a^2/2 + a^4/24

In[4]:=(sol=Solve[x\[Equal]s2,a][[2]] )//InputForm
Out[4]//InputForm={a -> Sqrt[2]*Sqrt[3 - Sqrt[3]*Sqrt[1 + 2*x]]}


acos[x_ /; 0<x<lim]:=Pi/2-x-x^3/6  ;
acos[x_ /; lim<x<1]:=Sqrt[2]*Sqrt[3-Sqrt[3]*Sqrt[1+2*x]]  ;
acos[x_ /; x<0]:=Pi-acos[-x];
no difference can be seen with a naked eye!  

  • Prev by Date: Re: Trigonometric math functions
  • Next by Date: Why does Limit sometimes just return what I input?
  • Previous by thread: Re: Trigonometric math functions
  • Next by thread: Re: Trigonometric math functions