Subject:
|
Re: evaluate inverse cosine, sine in IC
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Wed, 17 Nov 1999 02:10:29 GMT
|
Original-From:
|
Jason <jasonp@andrew.cmu.edu/spamcake/>
|
Viewed:
|
829 times
|
| |
| |
--On Monday, November 15, 1999, 5:15 PM -0700 Will <nepenthe@montana.com>
wrote:
> bedirhan wrote:
> >
> > Hi, is there a way to evaluate inverse cosine and sine using IC? Thx
>
> The most efficient way to do it is to use Taylor Series approximations of
> the functions. Decide how much precision you need, and then write
> functions that evaluate the first few terms in the appropriate series.
>
> Usually, a series will converge quite rapidly, and only half a dozen or
> so terms are needed. For example, if the sixth term in the series is on
> the order of 1.0E-6, then you're getting close to the limit of
> single-precision arithmetic anyway (and certainly close enough for horse
> shoes, hand grenades, and tactical nuclear weapons).
to get a better approximation use:
arcsin(x) = pi/2 - sqrt(1 - x)(a0 + a1*x + a2*x^2 + a3*x^3),
where
a0 = 1.5707288
a1 = -0.2121144
a2 = 0.0742610
a3 = -0.0187293
|
|
Message is in Reply To:
| | Re: evaluate inverse cosine, sine in IC
|
| (...) The most efficient way to do it is to use Taylor Series approximations of the functions. Decide how much precision you need, and then write functions that evaluate the first few terms in the appropriate series. Usually, a series will converge (...) (25 years ago, 16-Nov-99, to lugnet.robotics.handyboard)
|
6 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|