5
$\begingroup$

The Taylor expansion of the arcsine is usually given by $$ \arcsin(x) = x+ \frac{1}{6} x^3 + \frac{3}{40} x^5 + \frac{5}{112} x^7 + \ldots $$

This (https://github.com/simonbyrne/apple-libm/blob/master/Source/Intel/asin.c) implementation of the arcsine in libm uses constants that are very close to the above but slightly different. I understand that they can use better constants given the fact they know what taylor expansion they will stop at and to reduce the error over the fixed range they are interested in. My question is how do they determine those constants? How could I duplicate it if I wanted to use a different taylor expansion or a taylor expansion of different order?

$\endgroup$
1

1 Answer 1

6
$\begingroup$

See Computer Approximations by Hart, Cheney, et al. Likely what you're seeing are the result of Chebyshev (uniform) approximation over specific intervals. Have a look at the reference cited in the code for CR-LIBM.

$\endgroup$
1
  • 1
    $\begingroup$ +1 nice reference, pp.121-123 there detail the algorithm. $\endgroup$
    – gt6989b
    Commented Apr 21, 2021 at 14:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .