Mercurial > hg > CbC > CbC_gcc
comparison libquadmath/math/asinhq.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 /* asinhq.c -- __float128 version of s_asinh.c. | 1 /* s_asinhl.c -- long double version of s_asinh.c. |
2 * Conversion to long double by Ulrich Drepper, | 2 * Conversion to long double by Ulrich Drepper, |
3 * Cygnus Support, drepper@cygnus.com. | 3 * Cygnus Support, drepper@cygnus.com. |
4 */ | 4 */ |
5 | 5 |
6 /* | 6 /* |
12 * software is freely granted, provided that this notice | 12 * software is freely granted, provided that this notice |
13 * is preserved. | 13 * is preserved. |
14 * ==================================================== | 14 * ==================================================== |
15 */ | 15 */ |
16 | 16 |
17 /* asinhl(x) | 17 #if defined(LIBM_SCCS) && !defined(lint) |
18 static char rcsid[] = "$NetBSD: $"; | |
19 #endif | |
20 | |
21 /* asinhq(x) | |
18 * Method : | 22 * Method : |
19 * Based on | 23 * Based on |
20 * asinhl(x) = signl(x) * logl [ |x| + sqrtl(x*x+1) ] | 24 * asinhq(x) = signl(x) * logq [ |x| + sqrtq(x*x+1) ] |
21 * we have | 25 * we have |
22 * asinhl(x) := x if 1+x*x=1, | 26 * asinhq(x) := x if 1+x*x=1, |
23 * := signl(x)*(logl(x)+ln2)) for large |x|, else | 27 * := signl(x)*(logq(x)+ln2)) for large |x|, else |
24 * := signl(x)*logl(2|x|+1/(|x|+sqrtl(x*x+1))) if|x|>2, else | 28 * := signl(x)*logq(2|x|+1/(|x|+sqrtq(x*x+1))) if|x|>2, else |
25 * := signl(x)*log1pl(|x| + x^2/(1 + sqrtl(1+x^2))) | 29 * := signl(x)*log1pq(|x| + x^2/(1 + sqrtq(1+x^2))) |
26 */ | 30 */ |
27 | 31 |
28 #include "quadmath-imp.h" | 32 #include "quadmath-imp.h" |
29 | 33 |
30 static const __float128 | 34 static const __float128 |
31 one = 1.0Q, | 35 one = 1, |
32 ln2 = 6.931471805599453094172321214581765681e-1Q, | 36 ln2 = 6.931471805599453094172321214581765681e-1Q, |
33 huge = 1.0e+4900Q; | 37 huge = 1.0e+4900Q; |
34 | 38 |
35 __float128 | 39 __float128 |
36 asinhq (__float128 x) | 40 asinhq (__float128 x) |