Mercurial > hg > CbC > CbC_gcc
comparison libquadmath/math/asinq.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | 561a7518be6b |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
29 | 29 |
30 You should have received a copy of the GNU Lesser General Public | 30 You should have received a copy of the GNU Lesser General Public |
31 License along with this library; if not, write to the Free Software | 31 License along with this library; if not, write to the Free Software |
32 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ | 32 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
33 | 33 |
34 /* __ieee754_asin(x) | 34 /* asinq(x) |
35 * Method : | 35 * Method : |
36 * Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ... | 36 * Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ... |
37 * we approximate asin(x) on [0,0.5] by | 37 * we approximate asin(x) on [0,0.5] by |
38 * asin(x) = x + x*x^2*R(x^2) | 38 * asin(x) = x + x*x^2*R(x^2) |
39 * Between .5 and .625 the approximation is | 39 * Between .5 and .625 the approximation is |
149 } | 149 } |
150 else if (ix < 0x3ffe0000) /* |x| < 0.5 */ | 150 else if (ix < 0x3ffe0000) /* |x| < 0.5 */ |
151 { | 151 { |
152 if (ix < 0x3fc60000) /* |x| < 2**-57 */ | 152 if (ix < 0x3fc60000) /* |x| < 2**-57 */ |
153 { | 153 { |
154 if (huge + x > one) | 154 math_check_force_underflow (x); |
155 return x; /* return x with inexact if x!=0 */ | 155 __float128 force_inexact = huge + x; |
156 math_force_eval (force_inexact); | |
157 return x; /* return x with inexact if x!=0 */ | |
156 } | 158 } |
157 else | 159 else |
158 { | 160 { |
159 t = x * x; | 161 t = x * x; |
160 /* Mark to use pS, qS later on. */ | 162 /* Mark to use pS, qS later on. */ |