Mercurial > hg > CbC > CbC_gcc
comparison libquadmath/math/cbrtq.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 /* cbrtq.c | 1 /* cbrtq.c |
2 * | 2 * |
3 * Cube root, __float128 precision | 3 * Cube root, long double precision |
4 * | 4 * |
5 * | 5 * |
6 * | 6 * |
7 * SYNOPSIS: | 7 * SYNOPSIS: |
8 * | 8 * |
9 * __float128 x, y, cbrtq(); | 9 * long double x, y, cbrtq(); |
10 * | 10 * |
11 * y = cbrtq( x ); | 11 * y = cbrtq( x ); |
12 * | 12 * |
13 * | 13 * |
14 * | 14 * |
51 | 51 |
52 You should have received a copy of the GNU Lesser General Public | 52 You should have received a copy of the GNU Lesser General Public |
53 License along with this library; if not, see | 53 License along with this library; if not, see |
54 <http://www.gnu.org/licenses/>. */ | 54 <http://www.gnu.org/licenses/>. */ |
55 | 55 |
56 | |
57 #include "quadmath-imp.h" | 56 #include "quadmath-imp.h" |
58 | 57 |
59 static const __float128 CBRT2 = 1.259921049894873164767210607278228350570251Q; | 58 static const __float128 CBRT2 = 1.259921049894873164767210607278228350570251Q; |
60 static const __float128 CBRT4 = 1.587401051968199474751705639272308260391493Q; | 59 static const __float128 CBRT4 = 1.587401051968199474751705639272308260391493Q; |
61 static const __float128 CBRT2I = 0.7937005259840997373758528196361541301957467Q; | 60 static const __float128 CBRT2I = 0.7937005259840997373758528196361541301957467Q; |
62 static const __float128 CBRT4I = 0.6299605249474365823836053036391141752851257Q; | 61 static const __float128 CBRT4I = 0.6299605249474365823836053036391141752851257Q; |
63 | 62 |
64 | 63 |
65 __float128 | 64 __float128 |
66 cbrtq ( __float128 x) | 65 cbrtq (__float128 x) |
67 { | 66 { |
68 int e, rem, sign; | 67 int e, rem, sign; |
69 __float128 z; | 68 __float128 z; |
70 | 69 |
71 if (!finiteq (x)) | 70 if (!finiteq (x)) |