Searching \ for 'ArcSin and transcendental Function' in subject line. ()
Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=arcsin+transcendental
Search entire site for: 'ArcSin and transcendental Function'.

Truncated match.
'ArcSin and transcendental Function'
1997\10\17@183244 by

Somebody ask last time how to calculate an ArcSin function.

Here some math tips for all who know how to compute transcendental
functions:

A transcendental function can be approximate with Taylor serie, unfortunatly
these series have a big default which is the precizion. To obtain
a good precizion, we would obliged to compute a lot of term.
Chebyshev polynomial approximation is quite good to do such a job,
with few terms, the approximation become acceptable, and if it is necessary
add again some terms to increase precizion.

Chebyshev polynom:
f(x) = 0,5.C0 + SUM [ (from n=1 to infinite) Cn.Tn(x) ]

With:
(1)  Tn(x) = Cos(n.ArcCos(x))

and:
|1
(2)  Cn = 2/pi x |   [[ f(x) . Tn(x) ] / SQRT (1 - x^2) ].dx
|-1

For example, to compute Sin(x):

Sin(x) = 0,5.C0 + C1.T1(x) + C2.T2(x) + C3.T3(x) + C4.T4(x) + C5.T5(x)

With Tn(X) calculated with formula (1):
T1(X) = X
T2(X) = 2.X^2 - 1
T3(X) = 4.X^3 - 3.X
T4(X) = 8.X^4 - 8.X^2 + 1
T5(X) = 16.X^5 - 20.X^3 + 5.X
And
With Cn calculated with formula (2):
C0 = 2,5525579
C1 = -0,2852616
C2 = 9,118016 E-3
C3 = -1,365875 E-4
C4 = 1,184962 E-6
C5 = -6,702792 E-9

For ArcSinus, Cn coefficient are:
C0 = 1.4866665
C1 = 3.8853034 E-2
C2 = 2.8854414 E-3
C3 = 2.8842183 E-3
C4 = 3.3223672 E-4
C5 = 4.1584779 E-6
C6 = 5.4965045 E-7
C7 = 7.5500784 E-8
C8 = 1.0671938 E-8
C9 = 1.5421800 E-9

With 10 Cn terms, final error will be less than 1E-6 and an averrage
of the error on the total range will give something about 1E-7.

With only a few term, we can obtain a very good precizion, this is how
most of calculator and arithmetic processor compute trenscendental function.
Sure this is not calculated with instruction, but it is often implemented
directly in hardware for arithmetic co-processor.
Some suppliers have released some chip which contains all necessary
algorithm, see AMD for example.

With the same formula, we can calculate other transcendental function
such:   Logarithm, Exponential, ArcSinus, Cosinus, etc ...

For Square Route, better is to use a combination of linear approximation
and Newton-Ralfson successive approximation methods, but it is another
story ...

Regards,
Philippe Techer.

+--------------------------------------------------------+
|  Virtual Micro Design                                  |
|  I.D.L.S.,                                             |
|  Technopole Izarbel                                    |
|  64210 BIDART                                          |
|  FRANCE                                                |
|                                                        |
| Phone: ++33 559.438.458  Fax: ++33 559.438.401         |
| E-Mail: p.techeridls.izarbel.tm.fr                    |
| URL:    http://idls.izarbel.tm.fr/entp/techer          |
|  or     http://sistudio.com/umps                       |
+--------------------------------------------------------+

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...