summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libquadmath/ChangeLog56
-rw-r--r--libquadmath/Makefile.am4
-rw-r--r--libquadmath/Makefile.in125
-rw-r--r--libquadmath/libquadmath.texi2
-rw-r--r--libquadmath/math/acoshq.c24
-rw-r--r--libquadmath/math/acosq.c18
-rw-r--r--libquadmath/math/asinhq.c20
-rw-r--r--libquadmath/math/asinq.c20
-rw-r--r--libquadmath/math/atan2q.c24
-rw-r--r--libquadmath/math/atanhq.c15
-rw-r--r--libquadmath/math/atanq.c13
-rw-r--r--libquadmath/math/cacoshq.c61
-rw-r--r--libquadmath/math/cacosq.c37
-rw-r--r--libquadmath/math/casinhq.c34
-rw-r--r--libquadmath/math/casinhq_kernel.c202
-rw-r--r--libquadmath/math/casinq.c12
-rw-r--r--libquadmath/math/catanhq.c92
-rw-r--r--libquadmath/math/catanq.c95
-rw-r--r--libquadmath/math/cbrtq.c7
-rw-r--r--libquadmath/math/ccoshq.c56
-rw-r--r--libquadmath/math/ceilq.c18
-rw-r--r--libquadmath/math/cexpq.c57
-rw-r--r--libquadmath/math/cimagq.c9
-rw-r--r--libquadmath/math/clog10q.c57
-rw-r--r--libquadmath/math/clogq.c51
-rw-r--r--libquadmath/math/conjq.c9
-rw-r--r--libquadmath/math/copysignq.c28
-rw-r--r--libquadmath/math/coshq.c34
-rw-r--r--libquadmath/math/cosq.c13
-rw-r--r--libquadmath/math/cosq_kernel.c35
-rw-r--r--libquadmath/math/cprojq.c16
-rw-r--r--libquadmath/math/crealq.c9
-rw-r--r--libquadmath/math/csinhq.c54
-rw-r--r--libquadmath/math/csinq.c52
-rw-r--r--libquadmath/math/csqrtq.c69
-rw-r--r--libquadmath/math/ctanhq.c45
-rw-r--r--libquadmath/math/ctanq.c47
-rw-r--r--libquadmath/math/erfq.c27
-rw-r--r--libquadmath/math/exp2q.c51
-rw-r--r--libquadmath/math/expm1q.c23
-rw-r--r--libquadmath/math/expq.c1020
-rw-r--r--libquadmath/math/expq_table.h970
-rw-r--r--libquadmath/math/fabsq.c21
-rw-r--r--libquadmath/math/fdimq.c24
-rw-r--r--libquadmath/math/finiteq.c19
-rw-r--r--libquadmath/math/floorq.c18
-rw-r--r--libquadmath/math/fmaxq.c17
-rw-r--r--libquadmath/math/fminq.c17
-rw-r--r--libquadmath/math/fmodq.c196
-rw-r--r--libquadmath/math/frexpq.c41
-rw-r--r--libquadmath/math/hypotq.c189
-rw-r--r--libquadmath/math/ilogbq.c33
-rw-r--r--libquadmath/math/isinf_nsq.c19
-rw-r--r--libquadmath/math/isinfq.c19
-rw-r--r--libquadmath/math/isnanq.c26
-rw-r--r--libquadmath/math/issignalingq.c43
-rw-r--r--libquadmath/math/j0q.c47
-rw-r--r--libquadmath/math/j1q.c50
-rw-r--r--libquadmath/math/jnq.c531
-rw-r--r--libquadmath/math/ldexpq.c25
-rw-r--r--libquadmath/math/lgammaq.c151
-rw-r--r--libquadmath/math/lgammaq_neg.c549
-rw-r--r--libquadmath/math/lgammaq_product.c50
-rw-r--r--libquadmath/math/llrintq.c21
-rw-r--r--libquadmath/math/llroundq.c23
-rw-r--r--libquadmath/math/log10q.c26
-rw-r--r--libquadmath/math/log1pq.c33
-rw-r--r--libquadmath/math/log2q.c25
-rw-r--r--libquadmath/math/logbq.c6
-rw-r--r--libquadmath/math/logq.c26
-rw-r--r--libquadmath/math/lrintq.c21
-rw-r--r--libquadmath/math/lroundq.c27
-rw-r--r--libquadmath/math/modfq.c19
-rw-r--r--libquadmath/math/nearbyintq.c25
-rw-r--r--libquadmath/math/nextafterq.c25
-rw-r--r--libquadmath/math/powq.c25
-rw-r--r--libquadmath/math/remainderq.c86
-rw-r--r--libquadmath/math/remquoq.c12
-rw-r--r--libquadmath/math/rintq.c15
-rw-r--r--libquadmath/math/roundq.c12
-rw-r--r--libquadmath/math/scalblnq.c14
-rw-r--r--libquadmath/math/scalbnq.c11
-rw-r--r--libquadmath/math/signbitq.c26
-rw-r--r--libquadmath/math/sincos_table.c11
-rw-r--r--libquadmath/math/sincosq.c10
-rw-r--r--libquadmath/math/sincosq_kernel.c44
-rw-r--r--libquadmath/math/sinhq.c38
-rw-r--r--libquadmath/math/sinq.c13
-rw-r--r--libquadmath/math/sinq_kernel.c27
-rw-r--r--libquadmath/math/tanhq.c32
-rw-r--r--libquadmath/math/tanq.c187
-rw-r--r--libquadmath/math/tanq_kernel.c165
-rw-r--r--libquadmath/math/tgammaq.c214
-rw-r--r--libquadmath/math/tgammaq_product.c43
-rw-r--r--libquadmath/math/truncq.c10
-rw-r--r--libquadmath/math/x2y2m1q.c45
-rw-r--r--libquadmath/quadmath-imp.h109
-rw-r--r--libquadmath/quadmath.h2
-rw-r--r--libquadmath/quadmath.map6
-rw-r--r--libquadmath/quadmath_weak.h2
-rwxr-xr-xlibquadmath/update-quadmath.py255
101 files changed, 4544 insertions, 2843 deletions
diff --git a/libquadmath/ChangeLog b/libquadmath/ChangeLog
index be853cb755a..e169a3d8fd4 100644
--- a/libquadmath/ChangeLog
+++ b/libquadmath/ChangeLog
@@ -1,3 +1,59 @@
+2018-11-05 Joseph Myers <joseph@codesourcery.com>
+
+ PR libquadmath/68686
+ * Makefile.am: (libquadmath_la_SOURCES): Remove math/isinf_nsq.c.
+ Add math/exp2q.c math/issignalingq.c math/lgammaq_neg.c
+ math/lgammaq_product.c math/tanq_kernel.c math/tgammaq_product.c
+ math/casinhq_kernel.c.
+ * Makefile.in: Regenerate.
+ * libquadmath.texi (exp2q, issignalingq): Document.
+ * quadmath-imp.h: Include <errno.h>, <limits.h>, <stdbool.h> and
+ <fenv.h>.
+ (HIGH_ORDER_BIT_IS_SET_FOR_SNAN, FIX_FLT128_LONG_CONVERT_OVERFLOW)
+ (FIX_FLT128_LLONG_CONVERT_OVERFLOW, __quadmath_kernel_tanq)
+ (__quadmath_gamma_productq, __quadmath_gammaq_r)
+ (__quadmath_lgamma_negq, __quadmath_lgamma_productq)
+ (__quadmath_lgammaq_r, __quadmath_kernel_casinhq, mul_splitq)
+ (math_check_force_underflow_complex, __glibc_likely)
+ (__glibc_unlikely, struct rm_ctx, SET_RESTORE_ROUNDF128)
+ (libc_feholdsetround_ctx, libc_feresetround_ctx): New.
+ (feraiseexcept, fenv_t, feholdexcept, fesetround, feupdateenv)
+ (fesetenv, fetestexcept, feclearexcept): Define if not supported
+ through <fenv.h>.
+ (__quadmath_isinf_nsq): Remove.
+ * quadmath.h (exp2q, issignalingq): New.
+ * quadmath.map (QUADMATH_1.2): New.
+ * quadmath_weak.h (exp2q, issignalingq): New.
+ * update-quadmath.py: New file.
+ * math/isinf_nsq.c: Remove file.
+ * math/casinhq_kernel.c, math/exp2q.c, math/expq_table.h,
+ math/issignalingq.c, math/lgammaq_neg.c, math/lgammaq_product.c,
+ math/tanq_kernel.c, math/tgammaq_product.c: New files. Generated
+ from glibc sources with update-quadmath.py.
+ * math/acoshq.c, math/acosq.c, math/asinhq.c, math/asinq.c,
+ math/atan2q.c, math/atanhq.c, math/atanq.c, math/cacoshq.c,
+ math/cacosq.c, math/casinhq.c, math/casinq.c, math/catanhq.c,
+ math/catanq.c, math/cbrtq.c, math/ccoshq.c, math/ceilq.c,
+ math/cexpq.c, math/cimagq.c, math/clog10q.c, math/clogq.c,
+ math/conjq.c, math/copysignq.c, math/coshq.c, math/cosq.c,
+ math/cosq_kernel.c, math/cprojq.c, math/crealq.c, math/csinhq.c,
+ math/csinq.c, math/csqrtq.c, math/ctanhq.c, math/ctanq.c,
+ math/erfq.c, math/expm1q.c, math/expq.c, math/fabsq.c,
+ math/fdimq.c, math/finiteq.c, math/floorq.c, math/fmaxq.c,
+ math/fminq.c, math/fmodq.c, math/frexpq.c, math/hypotq.c,
+ math/ilogbq.c, math/isinfq.c, math/isnanq.c, math/j0q.c,
+ math/j1q.c, math/jnq.c, math/ldexpq.c, math/lgammaq.c,
+ math/llrintq.c, math/llroundq.c, math/log10q.c, math/log1pq.c,
+ math/log2q.c, math/logbq.c, math/logq.c, math/lrintq.c,
+ math/lroundq.c, math/modfq.c, math/nearbyintq.c,
+ math/nextafterq.c, math/powq.c, math/remainderq.c, math/remquoq.c,
+ math/rintq.c, math/roundq.c, math/scalblnq.c, math/scalbnq.c,
+ math/signbitq.c, math/sincos_table.c, math/sincosq.c,
+ math/sincosq_kernel.c, math/sinhq.c, math/sinq.c,
+ math/sinq_kernel.c, math/tanhq.c, math/tanq.c, math/tgammaq.c,
+ math/truncq.c, math/x2y2m1q.c: Regenerate from glibc sources with
+ update-quadmath.py.
+
2018-10-31 Joseph Myers <joseph@codesourcery.com>
PR bootstrap/82856
diff --git a/libquadmath/Makefile.am b/libquadmath/Makefile.am
index 2e22ef69ce4..35dffb46f6e 100644
--- a/libquadmath/Makefile.am
+++ b/libquadmath/Makefile.am
@@ -44,7 +44,7 @@ nodist_libsubinclude_HEADERS = quadmath.h quadmath_weak.h
libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
libquadmath_la_SOURCES = \
- math/x2y2m1q.c math/isinf_nsq.c math/acoshq.c math/fmodq.c \
+ math/x2y2m1q.c math/acoshq.c math/fmodq.c \
math/acosq.c math/frexpq.c \
math/rem_pio2q.c math/asinhq.c math/hypotq.c math/remainderq.c \
math/asinq.c math/rintq.c math/atan2q.c math/isinfq.c \
@@ -58,6 +58,8 @@ libquadmath_la_SOURCES = \
math/tanhq.c math/expq.c math/modfq.c math/tanq.c math/fabsq.c \
math/nanq.c math/tgammaq.c math/finiteq.c math/nextafterq.c \
math/truncq.c math/floorq.c math/powq.c math/fmaq.c math/logbq.c \
+ math/exp2q.c math/issignalingq.c math/lgammaq_neg.c math/lgammaq_product.c \
+ math/tanq_kernel.c math/tgammaq_product.c math/casinhq_kernel.c \
math/cacoshq.c math/cacosq.c math/casinhq.c math/casinq.c \
math/catanhq.c math/catanq.c math/cimagq.c math/conjq.c math/cprojq.c \
math/crealq.c math/fdimq.c math/fmaxq.c math/fminq.c math/ilogbq.c \
diff --git a/libquadmath/Makefile.in b/libquadmath/Makefile.in
index 95c3f9a3094..32cf5098508 100644
--- a/libquadmath/Makefile.in
+++ b/libquadmath/Makefile.in
@@ -147,53 +147,58 @@ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(infodir)" \
LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
am__dirstamp = $(am__leading_dot)dirstamp
@BUILD_LIBQUADMATH_TRUE@am_libquadmath_la_OBJECTS = math/x2y2m1q.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/isinf_nsq.lo math/acoshq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/fmodq.lo math/acosq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/frexpq.lo math/rem_pio2q.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/asinhq.lo math/hypotq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/remainderq.lo math/asinq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/rintq.lo math/atan2q.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/isinfq.lo math/roundq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/atanhq.lo math/isnanq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/scalblnq.lo math/atanq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/j0q.lo math/scalbnq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/cbrtq.lo math/j1q.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/signbitq.lo math/ceilq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/jnq.lo math/sincos_table.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/complex.lo math/ldexpq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/sincosq.lo math/copysignq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/lgammaq.lo math/sincosq_kernel.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/coshq.lo math/llroundq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/sinhq.lo math/cosq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/log10q.lo math/sinq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/cosq_kernel.lo math/log1pq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/sinq_kernel.lo math/erfq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/logq.lo math/sqrtq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/expm1q.lo math/lroundq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/tanhq.lo math/expq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/modfq.lo math/tanq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/fabsq.lo math/nanq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/tgammaq.lo math/finiteq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/nextafterq.lo math/truncq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/floorq.lo math/powq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/fmaq.lo math/logbq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/cacoshq.lo math/cacosq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/casinhq.lo math/casinq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/catanhq.lo math/catanq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/cimagq.lo math/conjq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/cprojq.lo math/crealq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/fdimq.lo math/fmaxq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/fminq.lo math/ilogbq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/llrintq.lo math/log2q.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/lrintq.lo math/nearbyintq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/remquoq.lo math/ccoshq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/cexpq.lo math/clog10q.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/clogq.lo math/csinq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/csinhq.lo math/csqrtq.lo \
-@BUILD_LIBQUADMATH_TRUE@ math/ctanq.lo math/ctanhq.lo \
-@BUILD_LIBQUADMATH_TRUE@ printf/addmul_1.lo printf/add_n.lo \
-@BUILD_LIBQUADMATH_TRUE@ printf/cmp.lo printf/divrem.lo \
-@BUILD_LIBQUADMATH_TRUE@ printf/flt1282mpn.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/acoshq.lo math/fmodq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/acosq.lo math/frexpq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/rem_pio2q.lo math/asinhq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/hypotq.lo math/remainderq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/asinq.lo math/rintq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/atan2q.lo math/isinfq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/roundq.lo math/atanhq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/isnanq.lo math/scalblnq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/atanq.lo math/j0q.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/scalbnq.lo math/cbrtq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/j1q.lo math/signbitq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/ceilq.lo math/jnq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/sincos_table.lo math/complex.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/ldexpq.lo math/sincosq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/copysignq.lo math/lgammaq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/sincosq_kernel.lo math/coshq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/llroundq.lo math/sinhq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/cosq.lo math/log10q.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/sinq.lo math/cosq_kernel.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/log1pq.lo math/sinq_kernel.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/erfq.lo math/logq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/sqrtq.lo math/expm1q.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/lroundq.lo math/tanhq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/expq.lo math/modfq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/tanq.lo math/fabsq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/nanq.lo math/tgammaq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/finiteq.lo math/nextafterq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/truncq.lo math/floorq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/powq.lo math/fmaq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/logbq.lo math/exp2q.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/issignalingq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/lgammaq_neg.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/lgammaq_product.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/tanq_kernel.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/tgammaq_product.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/casinhq_kernel.lo math/cacoshq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/cacosq.lo math/casinhq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/casinq.lo math/catanhq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/catanq.lo math/cimagq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/conjq.lo math/cprojq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/crealq.lo math/fdimq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/fmaxq.lo math/fminq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/ilogbq.lo math/llrintq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/log2q.lo math/lrintq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/nearbyintq.lo math/remquoq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/ccoshq.lo math/cexpq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/clog10q.lo math/clogq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/csinq.lo math/csinhq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/csqrtq.lo math/ctanq.lo \
+@BUILD_LIBQUADMATH_TRUE@ math/ctanhq.lo printf/addmul_1.lo \
+@BUILD_LIBQUADMATH_TRUE@ printf/add_n.lo printf/cmp.lo \
+@BUILD_LIBQUADMATH_TRUE@ printf/divrem.lo printf/flt1282mpn.lo \
@BUILD_LIBQUADMATH_TRUE@ printf/fpioconst.lo printf/lshift.lo \
@BUILD_LIBQUADMATH_TRUE@ printf/mul_1.lo printf/mul_n.lo \
@BUILD_LIBQUADMATH_TRUE@ printf/mul.lo printf/printf_fphex.lo \
@@ -464,7 +469,7 @@ AUTOMAKE_OPTIONS = foreign info-in-builddir
@BUILD_LIBQUADMATH_TRUE@nodist_libsubinclude_HEADERS = quadmath.h quadmath_weak.h
@BUILD_LIBQUADMATH_TRUE@libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
@BUILD_LIBQUADMATH_TRUE@libquadmath_la_SOURCES = \
-@BUILD_LIBQUADMATH_TRUE@ math/x2y2m1q.c math/isinf_nsq.c math/acoshq.c math/fmodq.c \
+@BUILD_LIBQUADMATH_TRUE@ math/x2y2m1q.c math/acoshq.c math/fmodq.c \
@BUILD_LIBQUADMATH_TRUE@ math/acosq.c math/frexpq.c \
@BUILD_LIBQUADMATH_TRUE@ math/rem_pio2q.c math/asinhq.c math/hypotq.c math/remainderq.c \
@BUILD_LIBQUADMATH_TRUE@ math/asinq.c math/rintq.c math/atan2q.c math/isinfq.c \
@@ -478,6 +483,8 @@ AUTOMAKE_OPTIONS = foreign info-in-builddir
@BUILD_LIBQUADMATH_TRUE@ math/tanhq.c math/expq.c math/modfq.c math/tanq.c math/fabsq.c \
@BUILD_LIBQUADMATH_TRUE@ math/nanq.c math/tgammaq.c math/finiteq.c math/nextafterq.c \
@BUILD_LIBQUADMATH_TRUE@ math/truncq.c math/floorq.c math/powq.c math/fmaq.c math/logbq.c \
+@BUILD_LIBQUADMATH_TRUE@ math/exp2q.c math/issignalingq.c math/lgammaq_neg.c math/lgammaq_product.c \
+@BUILD_LIBQUADMATH_TRUE@ math/tanq_kernel.c math/tgammaq_product.c math/casinhq_kernel.c \
@BUILD_LIBQUADMATH_TRUE@ math/cacoshq.c math/cacosq.c math/casinhq.c math/casinq.c \
@BUILD_LIBQUADMATH_TRUE@ math/catanhq.c math/catanq.c math/cimagq.c math/conjq.c math/cprojq.c \
@BUILD_LIBQUADMATH_TRUE@ math/crealq.c math/fdimq.c math/fmaxq.c math/fminq.c math/ilogbq.c \
@@ -661,7 +668,6 @@ math/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) math/$(DEPDIR)
@: > math/$(DEPDIR)/$(am__dirstamp)
math/x2y2m1q.lo: math/$(am__dirstamp) math/$(DEPDIR)/$(am__dirstamp)
-math/isinf_nsq.lo: math/$(am__dirstamp) math/$(DEPDIR)/$(am__dirstamp)
math/acoshq.lo: math/$(am__dirstamp) math/$(DEPDIR)/$(am__dirstamp)
math/fmodq.lo: math/$(am__dirstamp) math/$(DEPDIR)/$(am__dirstamp)
math/acosq.lo: math/$(am__dirstamp) math/$(DEPDIR)/$(am__dirstamp)
@@ -727,6 +733,19 @@ math/floorq.lo: math/$(am__dirstamp) math/$(DEPDIR)/$(am__dirstamp)
math/powq.lo: math/$(am__dirstamp) math/$(DEPDIR)/$(am__dirstamp)
math/fmaq.lo: math/$(am__dirstamp) math/$(DEPDIR)/$(am__dirstamp)
math/logbq.lo: math/$(am__dirstamp) math/$(DEPDIR)/$(am__dirstamp)
+math/exp2q.lo: math/$(am__dirstamp) math/$(DEPDIR)/$(am__dirstamp)
+math/issignalingq.lo: math/$(am__dirstamp) \
+ math/$(DEPDIR)/$(am__dirstamp)
+math/lgammaq_neg.lo: math/$(am__dirstamp) \
+ math/$(DEPDIR)/$(am__dirstamp)
+math/lgammaq_product.lo: math/$(am__dirstamp) \
+ math/$(DEPDIR)/$(am__dirstamp)
+math/tanq_kernel.lo: math/$(am__dirstamp) \
+ math/$(DEPDIR)/$(am__dirstamp)
+math/tgammaq_product.lo: math/$(am__dirstamp) \
+ math/$(DEPDIR)/$(am__dirstamp)
+math/casinhq_kernel.lo: math/$(am__dirstamp) \
+ math/$(DEPDIR)/$(am__dirstamp)
math/cacoshq.lo: math/$(am__dirstamp) math/$(DEPDIR)/$(am__dirstamp)
math/cacosq.lo: math/$(am__dirstamp) math/$(DEPDIR)/$(am__dirstamp)
math/casinhq.lo: math/$(am__dirstamp) math/$(DEPDIR)/$(am__dirstamp)
@@ -830,6 +849,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/cacoshq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/cacosq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/casinhq.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/casinhq_kernel.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/casinq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/catanhq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/catanq.Plo@am__quote@
@@ -854,6 +874,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/ctanhq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/ctanq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/erfq.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/exp2q.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/expm1q.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/expq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/fabsq.Plo@am__quote@
@@ -867,14 +888,16 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/frexpq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/hypotq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/ilogbq.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/isinf_nsq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/isinfq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/isnanq.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/issignalingq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/j0q.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/j1q.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/jnq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/ldexpq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lgammaq.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lgammaq_neg.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lgammaq_product.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/llrintq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/llroundq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/log10q.Plo@am__quote@
@@ -906,7 +929,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/sqrtq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/tanhq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/tanq.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/tanq_kernel.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/tgammaq.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/tgammaq_product.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/truncq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/x2y2m1q.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@printf/$(DEPDIR)/add_n.Plo@am__quote@
diff --git a/libquadmath/libquadmath.texi b/libquadmath/libquadmath.texi
index af576334a3e..b2cda531917 100644
--- a/libquadmath/libquadmath.texi
+++ b/libquadmath/libquadmath.texi
@@ -157,6 +157,7 @@ The following mathematical functions are available:
@item @code{cosq}: cosine function
@item @code{erfq}: error function
@item @code{erfcq}: complementary error function
+@item @code{exp2q}: base 2 exponential function
@item @code{expq}: exponential function
@item @code{expm1q}: exponential minus 1 function
@need 800
@@ -173,6 +174,7 @@ The following mathematical functions are available:
@item @code{ilogbq}: get exponent of the value
@item @code{isinfq}: check for infinity
@item @code{isnanq}: check for not a number
+@item @code{issignalingq}: check for signaling not a number
@item @code{j0q}: Bessel function of the first kind, first order
@item @code{j1q}: Bessel function of the first kind, second order
@item @code{jnq}: Bessel function of the first kind, @var{n}-th order
diff --git a/libquadmath/math/acoshq.c b/libquadmath/math/acoshq.c
index 9845a8e364c..6e500a822b5 100644
--- a/libquadmath/math/acoshq.c
+++ b/libquadmath/math/acoshq.c
@@ -1,4 +1,4 @@
-/* acoshq.c -- __float128 version of e_acosh.c.
+/* e_acoshl.c -- long double version of e_acosh.c.
* Conversion to long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -16,11 +16,11 @@
/* acoshq(x)
* Method :
* Based on
- * acoshl(x) = logl [ x + sqrtl(x*x-1) ]
+ * acoshl(x) = logq [ x + sqrtq(x*x-1) ]
* we have
- * acoshl(x) := logl(x)+ln2, if x is large; else
- * acoshl(x) := logl(2x-1/(sqrtl(x*x-1)+x)) if x>2; else
- * acoshl(x) := log1pl(t+sqrtl(2.0*t+t*t)); where t=x-1.
+ * acoshl(x) := logq(x)+ln2, if x is large; else
+ * acoshl(x) := logq(2x-1/(sqrtq(x*x-1)+x)) if x>2; else
+ * acoshl(x) := log1pq(t+sqrtq(2.0*t+t*t)); where t=x-1.
*
* Special cases:
* acoshl(x) is NaN with signal if x<1.
@@ -30,11 +30,11 @@
#include "quadmath-imp.h"
static const __float128
-one = 1.0Q,
+one = 1.0,
ln2 = 0.6931471805599453094172321214581766Q;
__float128
-acoshq (__float128 x)
+acoshq(__float128 x)
{
__float128 t;
uint64_t lx;
@@ -44,16 +44,16 @@ acoshq (__float128 x)
return (x-x)/(x-x);
} else if(hx >=0x4035000000000000LL) { /* x > 2**54 */
if(hx >=0x7fff000000000000LL) { /* x is inf of NaN */
- return x+x;
+ return x+x;
} else
- return logq(x)+ln2; /* acoshl(huge)=logl(2x) */
+ return logq(x)+ln2; /* acoshl(huge)=logq(2x) */
} else if(((hx-0x3fff000000000000LL)|lx)==0) {
- return 0.0Q; /* acosh(1) = 0 */
+ return 0; /* acosh(1) = 0 */
} else if (hx > 0x4000000000000000LL) { /* 2**28 > x > 2 */
t=x*x;
- return logq(2.0Q*x-one/(x+sqrtq(t-one)));
+ return logq(2*x-one/(x+sqrtq(t-one)));
} else { /* 1<x<2 */
t = x-one;
- return log1pq(t+sqrtq(2.0Q*t+t*t));
+ return log1pq(t+sqrtq(2*t+t*t));
}
}
diff --git a/libquadmath/math/acosq.c b/libquadmath/math/acosq.c
index 7f2ed2725d1..2690cd3192d 100644
--- a/libquadmath/math/acosq.c
+++ b/libquadmath/math/acosq.c
@@ -10,11 +10,11 @@
*/
/*
- __float128 expansions are
+ Long double expansions are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
+ and are incorporated herein by permission of the author. The author
reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under
+ copying permissions. These modifications are distributed here under
the following terms:
This library is free software; you can redistribute it and/or
@@ -28,8 +28,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
/* acosq(x)
* Method :
@@ -57,7 +57,7 @@
#include "quadmath-imp.h"
static const __float128
- one = 1.0Q,
+ one = 1,
pio2_hi = 1.5707963267948966192313216916397514420986Q,
pio2_lo = 4.3359050650618905123985220130216759843812E-35Q,
@@ -272,11 +272,11 @@ acosq (__float128 x)
s = sqrtq (z);
/* Compute an extended precision square root from
the Newton iteration s -> 0.5 * (s + z / s).
- The change w from s to the improved value is
+ The change w from s to the improved value is
w = 0.5 * (s + z / s) - s = (s^2 + z)/2s - s = (z - s^2)/2s.
- Express s = f1 + f2 where f1 * f1 is exactly representable.
+ Express s = f1 + f2 where f1 * f1 is exactly representable.
w = (z - s^2)/2s = (z - f1^2 - 2 f1 f2 - f2^2)/2s .
- s + w has extended precision. */
+ s + w has extended precision. */
u.value = s;
u.words32.w2 = 0;
u.words32.w3 = 0;
diff --git a/libquadmath/math/asinhq.c b/libquadmath/math/asinhq.c
index f3644939b3a..95235893ee6 100644
--- a/libquadmath/math/asinhq.c
+++ b/libquadmath/math/asinhq.c
@@ -1,4 +1,4 @@
-/* asinhq.c -- __float128 version of s_asinh.c.
+/* s_asinhl.c -- long double version of s_asinh.c.
* Conversion to long double by Ulrich Drepper,
* Cygnus Support, drepper@cygnus.com.
*/
@@ -14,21 +14,25 @@
* ====================================================
*/
-/* asinhl(x)
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/* asinhq(x)
* Method :
* Based on
- * asinhl(x) = signl(x) * logl [ |x| + sqrtl(x*x+1) ]
+ * asinhq(x) = signl(x) * logq [ |x| + sqrtq(x*x+1) ]
* we have
- * asinhl(x) := x if 1+x*x=1,
- * := signl(x)*(logl(x)+ln2)) for large |x|, else
- * := signl(x)*logl(2|x|+1/(|x|+sqrtl(x*x+1))) if|x|>2, else
- * := signl(x)*log1pl(|x| + x^2/(1 + sqrtl(1+x^2)))
+ * asinhq(x) := x if 1+x*x=1,
+ * := signl(x)*(logq(x)+ln2)) for large |x|, else
+ * := signl(x)*logq(2|x|+1/(|x|+sqrtq(x*x+1))) if|x|>2, else
+ * := signl(x)*log1pq(|x| + x^2/(1 + sqrtq(1+x^2)))
*/
#include "quadmath-imp.h"
static const __float128
- one = 1.0Q,
+ one = 1,
ln2 = 6.931471805599453094172321214581765681e-1Q,
huge = 1.0e+4900Q;
diff --git a/libquadmath/math/asinq.c b/libquadmath/math/asinq.c
index 5dff2817694..ab98c3ba868 100644
--- a/libquadmath/math/asinq.c
+++ b/libquadmath/math/asinq.c
@@ -10,11 +10,11 @@
*/
/*
- __float128 expansions are
+ Long double expansions are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
- reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under the
+ and are incorporated herein by permission of the author. The author
+ reserves the right to distribute this material elsewhere under different
+ copying permissions. These modifications are distributed here under the
following terms:
This library is free software; you can redistribute it and/or
@@ -28,10 +28,10 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
-/* asinq(x)
+/* __ieee754_asin(x)
* Method :
* Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ...
* we approximate asin(x) on [0,0.5] by
@@ -58,11 +58,10 @@
*
*/
-
#include "quadmath-imp.h"
static const __float128
- one = 1.0Q,
+ one = 1,
huge = 1.0e+4932Q,
pio2_hi = 1.5707963267948966192313216916397514420986Q,
pio2_lo = 4.3359050650618905123985220130216759843812E-35Q,
@@ -129,8 +128,7 @@ static const __float128
__float128
asinq (__float128 x)
{
- __float128 t = 0;
- __float128 w, p, q, c, r, s;
+ __float128 t, w, p, q, c, r, s;
int32_t ix, sign, flag;
ieee854_float128 u;
diff --git a/libquadmath/math/atan2q.c b/libquadmath/math/atan2q.c
index daa303efba3..07dd28fd0c5 100644
--- a/libquadmath/math/atan2q.c
+++ b/libquadmath/math/atan2q.c
@@ -1,4 +1,4 @@
-/* atan2q.c -- __float128 version of e_atan2.c.
+/* e_atan2l.c -- long double version of e_atan2.c.
* Conversion to long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -15,9 +15,9 @@
/* atan2q(y,x)
* Method :
- * 1. Reduce y to positive by atan2q(y,x)=-atan2q(-y,x).
+ * 1. Reduce y to positive by atan2l(y,x)=-atan2l(-y,x).
* 2. Reduce x to positive by (if x and y are unexceptional):
- * ARG (x+iy) = arctan(y/x) ... if x > 0,
+ * ARG (x+iy) = arctan(y/x) ... if x > 0,
* ARG (x+iy) = pi - arctan[y/(-x)] ... if x < 0,
*
* Special cases:
@@ -51,7 +51,7 @@ pi = 3.14159265358979323846264338327950280e+00Q, /* 4000921fb54442d18469898
pi_lo = 8.67181013012378102479704402604335225e-35Q; /* 3f8dcd129024e088a67cc74020bbea64 */
__float128
-atan2q (__float128 y, __float128 x)
+atan2q(__float128 y, __float128 x)
{
__float128 z;
int64_t k,m,hx,hy,ix,iy;
@@ -64,14 +64,14 @@ atan2q (__float128 y, __float128 x)
if(((ix|((lx|-lx)>>63))>0x7fff000000000000LL)||
((iy|((ly|-ly)>>63))>0x7fff000000000000LL)) /* x or y is NaN */
return x+y;
- if(((hx-0x3fff000000000000LL)|lx)==0) return atanq(y); /* x=1.0Q */
+ if(((hx-0x3fff000000000000LL)|lx)==0) return atanq(y); /* x=1.0L */
m = ((hy>>63)&1)|((hx>>62)&2); /* 2*sign(x)+sign(y) */
/* when y = 0 */
if((iy|ly)==0) {
switch(m) {
case 0:
- case 1: return y; /* atan(+-0,+anything)=+-0 */
+ case 1: return y; /* atan(+-0,+anything)=+-0 */
case 2: return pi+tiny;/* atan(+0,-anything) = pi */
case 3: return -pi-tiny;/* atan(-0,-anything) =-pi */
}
@@ -85,8 +85,8 @@ atan2q (__float128 y, __float128 x)
switch(m) {
case 0: return pi_o_4+tiny;/* atan(+INF,+INF) */
case 1: return -pi_o_4-tiny;/* atan(-INF,+INF) */
- case 2: return 3.0Q*pi_o_4+tiny;/*atan(+INF,-INF)*/
- case 3: return -3.0Q*pi_o_4-tiny;/*atan(-INF,-INF)*/
+ case 2: return 3*pi_o_4+tiny;/*atan(+INF,-INF)*/
+ case 3: return -3*pi_o_4-tiny;/*atan(-INF,-INF)*/
}
} else {
switch(m) {
@@ -102,19 +102,19 @@ atan2q (__float128 y, __float128 x)
/* compute y/x */
k = (iy-ix)>>48;
- if(k > 120) z=pi_o_2+0.5Q*pi_lo; /* |y/x| > 2**120 */
- else if(hx<0&&k<-120) z=0.0Q; /* |y|/x < -2**120 */
+ if(k > 120) z=pi_o_2+0.5Q*pi_lo; /* |y/x| > 2**120 */
+ else if(hx<0&&k<-120) z=0; /* |y|/x < -2**120 */
else z=atanq(fabsq(y/x)); /* safe to do y/x */
switch (m) {
case 0: return z ; /* atan(+,+) */
case 1: {
- uint64_t zh;
+ uint64_t zh;
GET_FLT128_MSW64(zh,z);
SET_FLT128_MSW64(z,zh ^ 0x8000000000000000ULL);
}
return z ; /* atan(-,+) */
case 2: return pi-(z-pi_lo);/* atan(+,-) */
default: /* case 3 */
- return (z-pi_lo)-pi;/* atan(-,-) */
+ return (z-pi_lo)-pi;/* atan(-,-) */
}
}
diff --git a/libquadmath/math/atanhq.c b/libquadmath/math/atanhq.c
index 652138d495c..c285f4a4421 100644
--- a/libquadmath/math/atanhq.c
+++ b/libquadmath/math/atanhq.c
@@ -1,5 +1,5 @@
-/* s_atanhl.c -- __float128 version of s_atan.c.
- * Conversion to __float128 by Ulrich Drepper,
+/* s_atanhl.c -- long double version of s_atan.c.
+ * Conversion to long double by Ulrich Drepper,
* Cygnus Support, drepper@cygnus.com.
*/
@@ -22,8 +22,8 @@
* atanhl(x) = --- * log(1 + -------) = 0.5 * log1p(2 * --------)
* 2 1 - x 1 - x
*
- * For x<0.5
- * atanhl(x) = 0.5*log1pl(2x+2x*x/(1-x))
+ * For x<0.5
+ * atanhl(x) = 0.5*log1pq(2x+2x*x/(1-x))
*
* Special cases:
* atanhl(x) is NaN if |x| > 1 with signal;
@@ -34,11 +34,12 @@
#include "quadmath-imp.h"
-static const __float128 one = 1.0Q, huge = 1e4900Q;
-static const __float128 zero = 0.0Q;
+static const __float128 one = 1, huge = 1e4900Q;
+
+static const __float128 zero = 0;
__float128
-atanhq (__float128 x)
+atanhq(__float128 x)
{
__float128 t;
uint32_t jx, ix;
diff --git a/libquadmath/math/atanq.c b/libquadmath/math/atanq.c
index 01fd9d69e57..051d30a7b3f 100644
--- a/libquadmath/math/atanq.c
+++ b/libquadmath/math/atanq.c
@@ -1,15 +1,15 @@
/* s_atanl.c
*
- * Inverse circular tangent for 128-bit __float128 precision
+ * Inverse circular tangent for 128-bit long double precision
* (arctangent)
*
*
*
* SYNOPSIS:
*
- * __float128 x, y, atanl();
+ * long double x, y, atanq();
*
- * y = atanl( x );
+ * y = atanq( x );
*
*
*
@@ -55,9 +55,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
@@ -228,7 +227,7 @@ atanq (__float128 x)
/* Index of nearest table element.
Roundoff to integer is asymmetrical to avoid cancellation when t < 0
(cf. fdlibm). */
- k = 8.0Q * x + 0.25Q;
+ k = 8.0 * x + 0.25;
u = 0.125Q * k;
/* Small arctan argument. */
t = (x - u) / (1.0 + x * u);
diff --git a/libquadmath/math/cacoshq.c b/libquadmath/math/cacoshq.c
index a7025dc917d..2b170880edc 100644
--- a/libquadmath/math/cacoshq.c
+++ b/libquadmath/math/cacoshq.c
@@ -1,5 +1,5 @@
-/* Return arc hyperbole cosine for __float128 value.
- Copyright (C) 1997, 1998, 2006 Free Software Foundation, Inc.
+/* Return arc hyperbolic cosine for a complex type.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -14,13 +14,11 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
-
__complex128
cacoshq (__complex128 x)
{
@@ -38,57 +36,54 @@ cacoshq (__complex128 x)
__imag__ res = nanq ("");
else
__imag__ res = copysignq ((rcls == QUADFP_INFINITE
- ? (__real__ x < 0.0
- ? M_PIq - M_PI_4q : M_PI_4q)
- : M_PI_2q), __imag__ x);
+ ? (__real__ x < 0
+ ? M_PIq - M_PI_4q
+ : M_PI_4q)
+ : M_PI_2q), __imag__ x);
}
else if (rcls == QUADFP_INFINITE)
{
__real__ res = HUGE_VALQ;
if (icls >= QUADFP_ZERO)
- __imag__ res = copysignq (signbitq (__real__ x) ? M_PIq : 0.0,
- __imag__ x);
+ __imag__ res = copysignq (signbitq (__real__ x)
+ ? M_PIq : 0, __imag__ x);
else
__imag__ res = nanq ("");
}
else
{
__real__ res = nanq ("");
- __imag__ res = nanq ("");
+ if (rcls == QUADFP_ZERO)
+ __imag__ res = M_PI_2q;
+ else
+ __imag__ res = nanq ("");
}
}
else if (rcls == QUADFP_ZERO && icls == QUADFP_ZERO)
{
- __real__ res = 0.0;
+ __real__ res = 0;
__imag__ res = copysignq (M_PI_2q, __imag__ x);
}
- /* The factor 16 is just a guess. */
- else if (16.0Q * fabsq (__imag__ x) < fabsq (__real__ x))
- {
- /* Kahan's formula which avoid cancellation through subtraction in
- some cases. */
- res = 2.0Q * clogq (csqrtq ((x + 1.0Q) / 2.0Q)
- + csqrtq ((x - 1.0Q) / 2.0Q));
- if (signbitq (__real__ res))
- __real__ res = 0.0Q;
- }
else
{
__complex128 y;
- __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) - 1.0;
- __imag__ y = 2.0 * __real__ x * __imag__ x;
-
- y = csqrtq (y);
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
- if (signbitq (x))
- y = -y;
+ y = __quadmath_kernel_casinhq (y, 1);
- __real__ y += __real__ x;
- __imag__ y += __imag__ x;
-
- res = clogq (y);
+ if (signbitq (__imag__ x))
+ {
+ __real__ res = __real__ y;
+ __imag__ res = -__imag__ y;
+ }
+ else
+ {
+ __real__ res = -__real__ y;
+ __imag__ res = __imag__ y;
+ }
}
return res;
diff --git a/libquadmath/math/cacosq.c b/libquadmath/math/cacosq.c
index 3c257b029bf..0862c3aba63 100644
--- a/libquadmath/math/cacosq.c
+++ b/libquadmath/math/cacosq.c
@@ -1,5 +1,5 @@
-/* Return cosine of complex __float128 value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Return cosine of a complex type.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
@@ -25,11 +24,29 @@ cacosq (__complex128 x)
{
__complex128 y;
__complex128 res;
-
- y = casinq (x);
-
- __real__ res = M_PI_2q - __real__ y;
- __imag__ res = -__imag__ y;
+ int rcls = fpclassifyq (__real__ x);
+ int icls = fpclassifyq (__imag__ x);
+
+ if (rcls <= QUADFP_INFINITE || icls <= QUADFP_INFINITE
+ || (rcls == QUADFP_ZERO && icls == QUADFP_ZERO))
+ {
+ y = casinq (x);
+
+ __real__ res = (__float128) M_PI_2q - __real__ y;
+ if (__real__ res == 0)
+ __real__ res = 0;
+ __imag__ res = -__imag__ y;
+ }
+ else
+ {
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
+
+ y = __quadmath_kernel_casinhq (y, 1);
+
+ __real__ res = __imag__ y;
+ __imag__ res = __real__ y;
+ }
return res;
}
diff --git a/libquadmath/math/casinhq.c b/libquadmath/math/casinhq.c
index 11487b967fc..878a6c2b317 100644
--- a/libquadmath/math/casinhq.c
+++ b/libquadmath/math/casinhq.c
@@ -1,5 +1,5 @@
-/* Return arc hyperbole sine for __float128 value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Return arc hyperbolic sine for a complex float type.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -14,13 +14,11 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
-
__complex128
casinhq (__complex128 x)
{
@@ -37,15 +35,16 @@ casinhq (__complex128 x)
if (rcls == QUADFP_NAN)
__imag__ res = nanq ("");
else
- __imag__ res = copysignq (rcls >= QUADFP_ZERO ? M_PI_2q : M_PI_4q,
- __imag__ x);
+ __imag__ res = copysignq ((rcls >= QUADFP_ZERO
+ ? M_PI_2q : M_PI_4q),
+ __imag__ x);
}
else if (rcls <= QUADFP_INFINITE)
{
__real__ res = __real__ x;
if ((rcls == QUADFP_INFINITE && icls >= QUADFP_ZERO)
|| (rcls == QUADFP_NAN && icls == QUADFP_ZERO))
- __imag__ res = copysignq (0.0, __imag__ x);
+ __imag__ res = copysignq (0, __imag__ x);
else
__imag__ res = nanq ("");
}
@@ -61,22 +60,7 @@ casinhq (__complex128 x)
}
else
{
- __complex128 y;
-
- __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) + 1.0;
- __imag__ y = 2.0 * __real__ x * __imag__ x;
-
- y = csqrtq (y);
-
- __real__ y += __real__ x;
- __imag__ y += __imag__ x;
-
- res = clogq (y);
-
- /* Ensure zeros have correct sign and results are correct if
- very close to branch cuts. */
- __real__ res = copysignq (__real__ res, __real__ x);
- __imag__ res = copysignq (__imag__ res, __imag__ x);
+ res = __quadmath_kernel_casinhq (x, 0);
}
return res;
diff --git a/libquadmath/math/casinhq_kernel.c b/libquadmath/math/casinhq_kernel.c
new file mode 100644
index 00000000000..af384efd611
--- /dev/null
+++ b/libquadmath/math/casinhq_kernel.c
@@ -0,0 +1,202 @@
+/* Return arc hyperbolic sine for a complex float type, with the
+ imaginary part of the result possibly adjusted for use in
+ computing other functions.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "quadmath-imp.h"
+
+/* Return the complex inverse hyperbolic sine of finite nonzero Z,
+ with the imaginary part of the result subtracted from pi/2 if ADJ
+ is nonzero. */
+
+__complex128
+__quadmath_kernel_casinhq (__complex128 x, int adj)
+{
+ __complex128 res;
+ __float128 rx, ix;
+ __complex128 y;
+
+ /* Avoid cancellation by reducing to the first quadrant. */
+ rx = fabsq (__real__ x);
+ ix = fabsq (__imag__ x);
+
+ if (rx >= 1 / FLT128_EPSILON || ix >= 1 / FLT128_EPSILON)
+ {
+ /* For large x in the first quadrant, x + csqrt (1 + x * x)
+ is sufficiently close to 2 * x to make no significant
+ difference to the result; avoid possible overflow from
+ the squaring and addition. */
+ __real__ y = rx;
+ __imag__ y = ix;
+
+ if (adj)
+ {
+ __float128 t = __real__ y;
+ __real__ y = copysignq (__imag__ y, __imag__ x);
+ __imag__ y = t;
+ }
+
+ res = clogq (y);
+ __real__ res += (__float128) M_LN2q;
+ }
+ else if (rx >= 0.5Q && ix < FLT128_EPSILON / 8)
+ {
+ __float128 s = hypotq (1, rx);
+
+ __real__ res = logq (rx + s);
+ if (adj)
+ __imag__ res = atan2q (s, __imag__ x);
+ else
+ __imag__ res = atan2q (ix, s);
+ }
+ else if (rx < FLT128_EPSILON / 8 && ix >= 1.5Q)
+ {
+ __float128 s = sqrtq ((ix + 1) * (ix - 1));
+
+ __real__ res = logq (ix + s);
+ if (adj)
+ __imag__ res = atan2q (rx, copysignq (s, __imag__ x));
+ else
+ __imag__ res = atan2q (s, rx);
+ }
+ else if (ix > 1 && ix < 1.5Q && rx < 0.5Q)
+ {
+ if (rx < FLT128_EPSILON * FLT128_EPSILON)
+ {
+ __float128 ix2m1 = (ix + 1) * (ix - 1);
+ __float128 s = sqrtq (ix2m1);
+
+ __real__ res = log1pq (2 * (ix2m1 + ix * s)) / 2;
+ if (adj)
+ __imag__ res = atan2q (rx, copysignq (s, __imag__ x));
+ else
+ __imag__ res = atan2q (s, rx);
+ }
+ else
+ {
+ __float128 ix2m1 = (ix + 1) * (ix - 1);
+ __float128 rx2 = rx * rx;
+ __float128 f = rx2 * (2 + rx2 + 2 * ix * ix);
+ __float128 d = sqrtq (ix2m1 * ix2m1 + f);
+ __float128 dp = d + ix2m1;
+ __float128 dm = f / dp;
+ __float128 r1 = sqrtq ((dm + rx2) / 2);
+ __float128 r2 = rx * ix / r1;
+
+ __real__ res = log1pq (rx2 + dp + 2 * (rx * r1 + ix * r2)) / 2;
+ if (adj)
+ __imag__ res = atan2q (rx + r1, copysignq (ix + r2, __imag__ x));
+ else
+ __imag__ res = atan2q (ix + r2, rx + r1);
+ }
+ }
+ else if (ix == 1 && rx < 0.5Q)
+ {
+ if (rx < FLT128_EPSILON / 8)
+ {
+ __real__ res = log1pq (2 * (rx + sqrtq (rx))) / 2;
+ if (adj)
+ __imag__ res = atan2q (sqrtq (rx), copysignq (1, __imag__ x));
+ else
+ __imag__ res = atan2q (1, sqrtq (rx));
+ }
+ else
+ {
+ __float128 d = rx * sqrtq (4 + rx * rx);
+ __float128 s1 = sqrtq ((d + rx * rx) / 2);
+ __float128 s2 = sqrtq ((d - rx * rx) / 2);
+
+ __real__ res = log1pq (rx * rx + d + 2 * (rx * s1 + s2)) / 2;
+ if (adj)
+ __imag__ res = atan2q (rx + s1, copysignq (1 + s2, __imag__ x));
+ else
+ __imag__ res = atan2q (1 + s2, rx + s1);
+ }
+ }
+ else if (ix < 1 && rx < 0.5Q)
+ {
+ if (ix >= FLT128_EPSILON)
+ {
+ if (rx < FLT128_EPSILON * FLT128_EPSILON)
+ {
+ __float128 onemix2 = (1 + ix) * (1 - ix);
+ __float128 s = sqrtq (onemix2);
+
+ __real__ res = log1pq (2 * rx / s) / 2;
+ if (adj)
+ __imag__ res = atan2q (s, __imag__ x);
+ else
+ __imag__ res = atan2q (ix, s);
+ }
+ else
+ {
+ __float128 onemix2 = (1 + ix) * (1 - ix);
+ __float128 rx2 = rx * rx;
+ __float128 f = rx2 * (2 + rx2 + 2 * ix * ix);
+ __float128 d = sqrtq (onemix2 * onemix2 + f);
+ __float128 dp = d + onemix2;
+ __float128 dm = f / dp;
+ __float128 r1 = sqrtq ((dp + rx2) / 2);
+ __float128 r2 = rx * ix / r1;
+
+ __real__ res = log1pq (rx2 + dm + 2 * (rx * r1 + ix * r2)) / 2;
+ if (adj)
+ __imag__ res = atan2q (rx + r1, copysignq (ix + r2,
+ __imag__ x));
+ else
+ __imag__ res = atan2q (ix + r2, rx + r1);
+ }
+ }
+ else
+ {
+ __float128 s = hypotq (1, rx);
+
+ __real__ res = log1pq (2 * rx * (rx + s)) / 2;
+ if (adj)
+ __imag__ res = atan2q (s, __imag__ x);
+ else
+ __imag__ res = atan2q (ix, s);
+ }
+ math_check_force_underflow_nonneg (__real__ res);
+ }
+ else
+ {
+ __real__ y = (rx - ix) * (rx + ix) + 1;
+ __imag__ y = 2 * rx * ix;
+
+ y = csqrtq (y);
+
+ __real__ y += rx;
+ __imag__ y += ix;
+
+ if (adj)
+ {
+ __float128 t = __real__ y;
+ __real__ y = copysignq (__imag__ y, __imag__ x);
+ __imag__ y = t;
+ }
+
+ res = clogq (y);
+ }
+
+ /* Give results the correct sign for the original argument. */
+ __real__ res = copysignq (__real__ res, __real__ x);
+ __imag__ res = copysignq (__imag__ res, (adj ? 1 : __imag__ x));
+
+ return res;
+}
diff --git a/libquadmath/math/casinq.c b/libquadmath/math/casinq.c
index 122ef5d85ae..24ba60035e2 100644
--- a/libquadmath/math/casinq.c
+++ b/libquadmath/math/casinq.c
@@ -1,5 +1,5 @@
-/* Return arc sine of complex __float128 value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+/* Return arc sine of a complex float type.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -14,13 +14,11 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
-
__complex128
casinq (__complex128 x)
{
@@ -28,7 +26,7 @@ casinq (__complex128 x)
if (isnanq (__real__ x) || isnanq (__imag__ x))
{
- if (__real__ x == 0.0)
+ if (__real__ x == 0)
{
res = x;
}
diff --git a/libquadmath/math/catanhq.c b/libquadmath/math/catanhq.c
index 6a86e2d0202..adc0a9dddec 100644
--- a/libquadmath/math/catanhq.c
+++ b/libquadmath/math/catanhq.c
@@ -1,5 +1,5 @@
-/* Return arc hyperbole tangent for __float128 value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Return arc hyperbolic tangent for a complex float type.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -14,13 +14,11 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
-
__complex128
catanhq (__complex128 x)
{
@@ -28,16 +26,16 @@ catanhq (__complex128 x)
int rcls = fpclassifyq (__real__ x);
int icls = fpclassifyq (__imag__ x);
- if (rcls <= QUADFP_INFINITE || icls <= QUADFP_INFINITE)
+ if (__glibc_unlikely (rcls <= QUADFP_INFINITE || icls <= QUADFP_INFINITE))
{
if (icls == QUADFP_INFINITE)
{
- __real__ res = copysignq (0.0, __real__ x);
+ __real__ res = copysignq (0, __real__ x);
__imag__ res = copysignq (M_PI_2q, __imag__ x);
}
else if (rcls == QUADFP_INFINITE || rcls == QUADFP_ZERO)
{
- __real__ res = copysignq (0.0, __real__ x);
+ __real__ res = copysignq (0, __real__ x);
if (icls >= QUADFP_ZERO)
__imag__ res = copysignq (M_PI_2q, __imag__ x);
else
@@ -49,27 +47,83 @@ catanhq (__complex128 x)
__imag__ res = nanq ("");
}
}
- else if (rcls == QUADFP_ZERO && icls == QUADFP_ZERO)
+ else if (__glibc_unlikely (rcls == QUADFP_ZERO && icls == QUADFP_ZERO))
{
res = x;
}
else
{
- __float128 i2, num, den;
+ if (fabsq (__real__ x) >= 16 / FLT128_EPSILON
+ || fabsq (__imag__ x) >= 16 / FLT128_EPSILON)
+ {
+ __imag__ res = copysignq (M_PI_2q, __imag__ x);
+ if (fabsq (__imag__ x) <= 1)
+ __real__ res = 1 / __real__ x;
+ else if (fabsq (__real__ x) <= 1)
+ __real__ res = __real__ x / __imag__ x / __imag__ x;
+ else
+ {
+ __float128 h = hypotq (__real__ x / 2, __imag__ x / 2);
+ __real__ res = __real__ x / h / h / 4;
+ }
+ }
+ else
+ {
+ if (fabsq (__real__ x) == 1
+ && fabsq (__imag__ x) < FLT128_EPSILON * FLT128_EPSILON)
+ __real__ res = (copysignq (0.5Q, __real__ x)
+ * ((__float128) M_LN2q
+ - logq (fabsq (__imag__ x))));
+ else
+ {
+ __float128 i2 = 0;
+ if (fabsq (__imag__ x) >= FLT128_EPSILON * FLT128_EPSILON)
+ i2 = __imag__ x * __imag__ x;
+
+ __float128 num = 1 + __real__ x;
+ num = i2 + num * num;
- i2 = __imag__ x * __imag__ x;
+ __float128 den = 1 - __real__ x;
+ den = i2 + den * den;
- num = 1.0 + __real__ x;
- num = i2 + num * num;
+ __float128 f = num / den;
+ if (f < 0.5Q)
+ __real__ res = 0.25Q * logq (f);
+ else
+ {
+ num = 4 * __real__ x;
+ __real__ res = 0.25Q * log1pq (num / den);
+ }
+ }
- den = 1.0 - __real__ x;
- den = i2 + den * den;
+ __float128 absx, absy, den;
- __real__ res = 0.25 * (logq (num) - logq (den));
+ absx = fabsq (__real__ x);
+ absy = fabsq (__imag__ x);
+ if (absx < absy)
+ {
+ __float128 t = absx;
+ absx = absy;
+ absy = t;
+ }
- den = 1 - __real__ x * __real__ x - i2;
+ if (absy < FLT128_EPSILON / 2)
+ {
+ den = (1 - absx) * (1 + absx);
+ if (den == 0)
+ den = 0;
+ }
+ else if (absx >= 1)
+ den = (1 - absx) * (1 + absx) - absy * absy;
+ else if (absx >= 0.75Q || absy >= 0.5Q)
+ den = -__quadmath_x2y2m1q (absx, absy);
+ else
+ den = (1 - absx) * (1 + absx) - absy * absy;
+
+ __imag__ res = 0.5Q * atan2q (2 * __imag__ x, den);
+ }
- __imag__ res = 0.5 * atan2q (2.0 * __imag__ x, den);
+ math_check_force_underflow_complex (res);
}
return res;
diff --git a/libquadmath/math/catanq.c b/libquadmath/math/catanq.c
index a9c92579734..c1c50b7a5a7 100644
--- a/libquadmath/math/catanq.c
+++ b/libquadmath/math/catanq.c
@@ -1,5 +1,5 @@
-/* Return arc tangent of complex __float128 value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Return arc tangent of complex float type.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -14,13 +14,11 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
-
__complex128
catanq (__complex128 x)
{
@@ -28,12 +26,12 @@ catanq (__complex128 x)
int rcls = fpclassifyq (__real__ x);
int icls = fpclassifyq (__imag__ x);
- if (rcls <= QUADFP_INFINITE || icls <= QUADFP_INFINITE)
+ if (__glibc_unlikely (rcls <= QUADFP_INFINITE || icls <= QUADFP_INFINITE))
{
if (rcls == QUADFP_INFINITE)
{
__real__ res = copysignq (M_PI_2q, __real__ x);
- __imag__ res = copysignq (0.0, __imag__ x);
+ __imag__ res = copysignq (0, __imag__ x);
}
else if (icls == QUADFP_INFINITE)
{
@@ -41,12 +39,12 @@ catanq (__complex128 x)
__real__ res = copysignq (M_PI_2q, __real__ x);
else
__real__ res = nanq ("");
- __imag__ res = copysignq (0.0, __imag__ x);
+ __imag__ res = copysignq (0, __imag__ x);
}
else if (icls == QUADFP_ZERO || icls == QUADFP_INFINITE)
{
__real__ res = nanq ("");
- __imag__ res = copysignq (0.0, __imag__ x);
+ __imag__ res = copysignq (0, __imag__ x);
}
else
{
@@ -54,27 +52,84 @@ catanq (__complex128 x)
__imag__ res = nanq ("");
}
}
- else if (rcls == QUADFP_ZERO && icls == QUADFP_ZERO)
+ else if (__glibc_unlikely (rcls == QUADFP_ZERO && icls == QUADFP_ZERO))
{
res = x;
}
else
{
- __float128 r2, num, den;
+ if (fabsq (__real__ x) >= 16 / FLT128_EPSILON
+ || fabsq (__imag__ x) >= 16 / FLT128_EPSILON)
+ {
+ __real__ res = copysignq (M_PI_2q, __real__ x);
+ if (fabsq (__real__ x) <= 1)
+ __imag__ res = 1 / __imag__ x;
+ else if (fabsq (__imag__ x) <= 1)
+ __imag__ res = __imag__ x / __real__ x / __real__ x;
+ else
+ {
+ __float128 h = hypotq (__real__ x / 2, __imag__ x / 2);
+ __imag__ res = __imag__ x / h / h / 4;
+ }
+ }
+ else
+ {
+ __float128 den, absx, absy;
- r2 = __real__ x * __real__ x;
+ absx = fabsq (__real__ x);
+ absy = fabsq (__imag__ x);
+ if (absx < absy)
+ {
+ __float128 t = absx;
+ absx = absy;
+ absy = t;
+ }
- den = 1 - r2 - __imag__ x * __imag__ x;
+ if (absy < FLT128_EPSILON / 2)
+ {
+ den = (1 - absx) * (1 + absx);
+ if (den == 0)
+ den = 0;
+ }
+ else if (absx >= 1)
+ den = (1 - absx) * (1 + absx) - absy * absy;
+ else if (absx >= 0.75Q || absy >= 0.5Q)
+ den = -__quadmath_x2y2m1q (absx, absy);
+ else
+ den = (1 - absx) * (1 + absx) - absy * absy;
+
+ __real__ res = 0.5Q * atan2q (2 * __real__ x, den);
+
+ if (fabsq (__imag__ x) == 1
+ && fabsq (__real__ x) < FLT128_EPSILON * FLT128_EPSILON)
+ __imag__ res = (copysignq (0.5Q, __imag__ x)
+ * ((__float128) M_LN2q
+ - logq (fabsq (__real__ x))));
+ else
+ {
+ __float128 r2 = 0, num, f;
+
+ if (fabsq (__real__ x) >= FLT128_EPSILON * FLT128_EPSILON)
+ r2 = __real__ x * __real__ x;
- __real__ res = 0.5 * atan2q (2.0 * __real__ x, den);
+ num = __imag__ x + 1;
+ num = r2 + num * num;
- num = __imag__ x + 1.0;
- num = r2 + num * num;
+ den = __imag__ x - 1;
+ den = r2 + den * den;
- den = __imag__ x - 1.0;
- den = r2 + den * den;
+ f = num / den;
+ if (f < 0.5Q)
+ __imag__ res = 0.25Q * logq (f);
+ else
+ {
+ num = 4 * __imag__ x;
+ __imag__ res = 0.25Q * log1pq (num / den);
+ }
+ }
+ }
- __imag__ res = 0.25 * logq (num / den);
+ math_check_force_underflow_complex (res);
}
return res;
diff --git a/libquadmath/math/cbrtq.c b/libquadmath/math/cbrtq.c
index a7a36f953cd..5b8c30ea763 100644
--- a/libquadmath/math/cbrtq.c
+++ b/libquadmath/math/cbrtq.c
@@ -1,12 +1,12 @@
/* cbrtq.c
*
- * Cube root, __float128 precision
+ * Cube root, long double precision
*
*
*
* SYNOPSIS:
*
- * __float128 x, y, cbrtq();
+ * long double x, y, cbrtq();
*
* y = cbrtq( x );
*
@@ -53,7 +53,6 @@ Adapted for glibc October, 2001.
License along with this library; if not, see
<http://www.gnu.org/licenses/>. */
-
#include "quadmath-imp.h"
static const __float128 CBRT2 = 1.259921049894873164767210607278228350570251Q;
@@ -63,7 +62,7 @@ static const __float128 CBRT4I = 0.6299605249474365823836053036391141752851257Q;
__float128
-cbrtq ( __float128 x)
+cbrtq (__float128 x)
{
int e, rem, sign;
__float128 z;
diff --git a/libquadmath/math/ccoshq.c b/libquadmath/math/ccoshq.c
index 8d55ad3a99d..3772c1aa154 100644
--- a/libquadmath/math/ccoshq.c
+++ b/libquadmath/math/ccoshq.c
@@ -1,5 +1,5 @@
-/* Complex cosine hyperbole function for complex __float128.
- Copyright (C) 1997-2012 Free Software Foundation, Inc.
+/* Complex cosine hyperbolic function for float types.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,11 +19,6 @@
#include "quadmath-imp.h"
-#ifdef HAVE_FENV_H
-# include <fenv.h>
-#endif
-
-
__complex128
ccoshq (__complex128 x)
{
@@ -31,23 +26,23 @@ ccoshq (__complex128 x)
int rcls = fpclassifyq (__real__ x);
int icls = fpclassifyq (__imag__ x);
- if (__builtin_expect (rcls >= QUADFP_ZERO, 1))
+ if (__glibc_likely (rcls >= QUADFP_ZERO))
{
/* Real part is finite. */
- if (__builtin_expect (icls >= QUADFP_ZERO, 1))
+ if (__glibc_likely (icls >= QUADFP_ZERO))
{
/* Imaginary part is finite. */
const int t = (int) ((FLT128_MAX_EXP - 1) * M_LN2q);
__float128 sinix, cosix;
- if (__builtin_expect (icls != QUADFP_SUBNORMAL, 1))
+ if (__glibc_likely (fabsq (__imag__ x) > FLT128_MIN))
{
sincosq (__imag__ x, &sinix, &cosix);
}
else
{
sinix = __imag__ x;
- cosix = 1.0Q;
+ cosix = 1;
}
if (fabsq (__real__ x) > t)
@@ -57,8 +52,8 @@ ccoshq (__complex128 x)
if (signbitq (__real__ x))
sinix = -sinix;
rx -= t;
- sinix *= exp_t / 2.0Q;
- cosix *= exp_t / 2.0Q;
+ sinix *= exp_t / 2;
+ cosix *= exp_t / 2;
if (rx > t)
{
rx -= t;
@@ -83,62 +78,53 @@ ccoshq (__complex128 x)
__real__ retval = coshq (__real__ x) * cosix;
__imag__ retval = sinhq (__real__ x) * sinix;
}
+
+ math_check_force_underflow_complex (retval);
}
else
{
- __imag__ retval = __real__ x == 0.0Q ? 0.0Q : nanq ("");
- __real__ retval = nanq ("") + nanq ("");
-
-#ifdef HAVE_FENV_H
- if (icls == QUADFP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
+ __imag__ retval = __real__ x == 0 ? 0 : nanq ("");
+ __real__ retval = __imag__ x - __imag__ x;
+ }
}
else if (rcls == QUADFP_INFINITE)
{
/* Real part is infinite. */
- if (__builtin_expect (icls > QUADFP_ZERO, 1))
+ if (__glibc_likely (icls > QUADFP_ZERO))
{
/* Imaginary part is finite. */
__float128 sinix, cosix;
- if (__builtin_expect (icls != QUADFP_SUBNORMAL, 1))
+ if (__glibc_likely (fabsq (__imag__ x) > FLT128_MIN))
{
sincosq (__imag__ x, &sinix, &cosix);
}
else
{
sinix = __imag__ x;
- cosix = 1.0Q;
+ cosix = 1;
}
__real__ retval = copysignq (HUGE_VALQ, cosix);
__imag__ retval = (copysignq (HUGE_VALQ, sinix)
- * copysignq (1.0Q, __real__ x));
+ * copysignq (1, __real__ x));
}
else if (icls == QUADFP_ZERO)
{
/* Imaginary part is 0.0. */
__real__ retval = HUGE_VALQ;
- __imag__ retval = __imag__ x * copysignq (1.0Q, __real__ x);
+ __imag__ retval = __imag__ x * copysignq (1, __real__ x);
}
else
{
- /* The addition raises the invalid exception. */
__real__ retval = HUGE_VALQ;
- __imag__ retval = nanq ("") + nanq ("");
-
-#ifdef HAVE_FENV_H
- if (icls == QUADFP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
+ __imag__ retval = __imag__ x - __imag__ x;
+ }
}
else
{
__real__ retval = nanq ("");
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : nanq ("");
+ __imag__ retval = __imag__ x == 0 ? __imag__ x : nanq ("");
}
return retval;
diff --git a/libquadmath/math/ceilq.c b/libquadmath/math/ceilq.c
index 1adc1e1b9f0..5d221976665 100644
--- a/libquadmath/math/ceilq.c
+++ b/libquadmath/math/ceilq.c
@@ -1,4 +1,4 @@
-/* ceilq.c -- __float128 version of s_ceil.c.
+/* s_ceill.c -- long double version of s_ceil.c.
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -13,10 +13,22 @@
* ====================================================
*/
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * ceilq(x)
+ * Return x rounded toward -inf to integral value
+ * Method:
+ * Bit twiddling.
+ */
+
+#define NO_MATH_REDIRECT
+
#include "quadmath-imp.h"
-__float128
-ceilq (__float128 x)
+__float128 ceilq(__float128 x)
{
int64_t i0,i1,j0;
uint64_t i,j;
diff --git a/libquadmath/math/cexpq.c b/libquadmath/math/cexpq.c
index bd4be1ebe71..73bb4858b02 100644
--- a/libquadmath/math/cexpq.c
+++ b/libquadmath/math/cexpq.c
@@ -1,5 +1,5 @@
-/* Return value of complex exponential function for complex __float128 value.
- Copyright (C) 1997-2012 Free Software Foundation, Inc.
+/* Return value of complex exponential function for a float type.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,11 +19,6 @@
#include "quadmath-imp.h"
-#ifdef HAVE_FENV_H
-# include <fenv.h>
-#endif
-
-
__complex128
cexpq (__complex128 x)
{
@@ -31,23 +26,23 @@ cexpq (__complex128 x)
int rcls = fpclassifyq (__real__ x);
int icls = fpclassifyq (__imag__ x);
- if (__builtin_expect (rcls >= QUADFP_ZERO, 1))
+ if (__glibc_likely (rcls >= QUADFP_ZERO))
{
/* Real part is finite. */
- if (__builtin_expect (icls >= QUADFP_ZERO, 1))
+ if (__glibc_likely (icls >= QUADFP_ZERO))
{
/* Imaginary part is finite. */
const int t = (int) ((FLT128_MAX_EXP - 1) * M_LN2q);
__float128 sinix, cosix;
- if (__builtin_expect (icls != QUADFP_SUBNORMAL, 1))
+ if (__glibc_likely (fabsq (__imag__ x) > FLT128_MIN))
{
sincosq (__imag__ x, &sinix, &cosix);
}
else
{
sinix = __imag__ x;
- cosix = 1.0Q;
+ cosix = 1;
}
if (__real__ x > t)
@@ -75,6 +70,7 @@ cexpq (__complex128 x)
__real__ retval = exp_val * cosix;
__imag__ retval = exp_val * sinix;
}
+ math_check_force_underflow_complex (retval);
}
else
{
@@ -83,18 +79,16 @@ cexpq (__complex128 x)
__real__ retval = nanq ("");
__imag__ retval = nanq ("");
-#ifdef HAVE_FENV_H
feraiseexcept (FE_INVALID);
-#endif
}
}
- else if (__builtin_expect (rcls == QUADFP_INFINITE, 1))
+ else if (__glibc_likely (rcls == QUADFP_INFINITE))
{
/* Real part is infinite. */
- if (__builtin_expect (icls >= QUADFP_ZERO, 1))
+ if (__glibc_likely (icls >= QUADFP_ZERO))
{
/* Imaginary part is finite. */
- __float128 value = signbitq (__real__ x) ? 0.0Q : HUGE_VALQ;
+ __float128 value = signbitq (__real__ x) ? 0 : HUGE_VALQ;
if (icls == QUADFP_ZERO)
{
@@ -106,14 +100,14 @@ cexpq (__complex128 x)
{
__float128 sinix, cosix;
- if (__builtin_expect (icls != QUADFP_SUBNORMAL, 1))
+ if (__glibc_likely (fabsq (__imag__ x) > FLT128_MIN))
{
sincosq (__imag__ x, &sinix, &cosix);
}
else
{
sinix = __imag__ x;
- cosix = 1.0Q;
+ cosix = 1;
}
__real__ retval = copysignq (value, cosix);
@@ -123,29 +117,28 @@ cexpq (__complex128 x)
else if (signbitq (__real__ x) == 0)
{
__real__ retval = HUGE_VALQ;
- __imag__ retval = nanq ("");
-
-#ifdef HAVE_FENV_H
- if (icls == QUADFP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
+ __imag__ retval = __imag__ x - __imag__ x;
}
else
{
- __real__ retval = 0.0Q;
- __imag__ retval = copysignq (0.0Q, __imag__ x);
+ __real__ retval = 0;
+ __imag__ retval = copysignq (0, __imag__ x);
}
}
else
{
- /* If the real part is NaN the result is NaN + iNaN. */
+ /* If the real part is NaN the result is NaN + iNaN unless the
+ imaginary part is zero. */
__real__ retval = nanq ("");
- __imag__ retval = nanq ("");
+ if (icls == QUADFP_ZERO)
+ __imag__ retval = __imag__ x;
+ else
+ {
+ __imag__ retval = nanq ("");
-#ifdef HAVE_FENV_H
- if (rcls != QUADFP_NAN || icls != QUADFP_NAN)
- feraiseexcept (FE_INVALID);
-#endif
+ if (rcls != QUADFP_NAN || icls != QUADFP_NAN)
+ feraiseexcept (FE_INVALID);
+ }
}
return retval;
diff --git a/libquadmath/math/cimagq.c b/libquadmath/math/cimagq.c
index 9b3bf70a10d..d75b0a91676 100644
--- a/libquadmath/math/cimagq.c
+++ b/libquadmath/math/cimagq.c
@@ -1,5 +1,5 @@
-/* Return imaginary part of complex __float128 value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Return imaginary part of complex float type.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
diff --git a/libquadmath/math/clog10q.c b/libquadmath/math/clog10q.c
index c379bec72b6..a6b46805f00 100644
--- a/libquadmath/math/clog10q.c
+++ b/libquadmath/math/clog10q.c
@@ -1,5 +1,5 @@
-/* Compute complex base 10 logarithm for complex __float128.
- Copyright (C) 1997-2012 Free Software Foundation, Inc.
+/* Compute complex base 10 logarithm.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,10 +19,11 @@
#include "quadmath-imp.h"
-
/* log_10 (2). */
-#define M_LOG10_2q 0.3010299956639811952137388947244930267682Q
+#define LOG10_2 0.3010299956639811952137388947244930267682Q
+/* pi * log10 (e). */
+#define PI_LOG10E 1.364376353841841347485783625431355770210Q
__complex128
clog10q (__complex128 x)
@@ -31,15 +32,15 @@ clog10q (__complex128 x)
int rcls = fpclassifyq (__real__ x);
int icls = fpclassifyq (__imag__ x);
- if (__builtin_expect (rcls == QUADFP_ZERO && icls == QUADFP_ZERO, 0))
+ if (__glibc_unlikely (rcls == QUADFP_ZERO && icls == QUADFP_ZERO))
{
/* Real and imaginary part are 0.0. */
- __imag__ result = signbitq (__real__ x) ? M_PIq : 0.0Q;
+ __imag__ result = signbitq (__real__ x) ? PI_LOG10E : 0;
__imag__ result = copysignq (__imag__ result, __imag__ x);
/* Yes, the following line raises an exception. */
- __real__ result = -1.0Q / fabsq (__real__ x);
+ __real__ result = -1 / fabsq (__real__ x);
}
- else if (__builtin_expect (rcls != QUADFP_NAN && icls != QUADFP_NAN, 1))
+ else if (__glibc_likely (rcls != QUADFP_NAN && icls != QUADFP_NAN))
{
/* Neither real nor imaginary part is NaN. */
__float128 absx = fabsq (__real__ x), absy = fabsq (__imag__ x);
@@ -52,11 +53,11 @@ clog10q (__complex128 x)
absy = t;
}
- if (absx > FLT128_MAX / 2.0Q)
+ if (absx > FLT128_MAX / 2)
{
scale = -1;
absx = scalbnq (absx, scale);
- absy = (absy >= FLT128_MIN * 2.0Q ? scalbnq (absy, scale) : 0.0Q);
+ absy = (absy >= FLT128_MIN * 2 ? scalbnq (absy, scale) : 0);
}
else if (absx < FLT128_MIN && absy < FLT128_MIN)
{
@@ -65,39 +66,39 @@ clog10q (__complex128 x)
absy = scalbnq (absy, scale);
}
- if (absx == 1.0Q && scale == 0)
+ if (absx == 1 && scale == 0)
{
- __float128 absy2 = absy * absy;
- if (absy2 <= FLT128_MIN * 2.0Q * M_LN10q)
- __real__ result
- = (absy2 / 2.0Q - absy2 * absy2 / 4.0Q) * M_LOG10Eq;
- else
- __real__ result = log1pq (absy2) * (M_LOG10Eq / 2.0Q);
+ __real__ result = (log1pq (absy * absy)
+ * ((__float128) M_LOG10Eq / 2));
+ math_check_force_underflow_nonneg (__real__ result);
}
- else if (absx > 1.0Q && absx < 2.0Q && absy < 1.0Q && scale == 0)
+ else if (absx > 1 && absx < 2 && absy < 1 && scale == 0)
{
- __float128 d2m1 = (absx - 1.0Q) * (absx + 1.0Q);
+ __float128 d2m1 = (absx - 1) * (absx + 1);
if (absy >= FLT128_EPSILON)
d2m1 += absy * absy;
- __real__ result = log1pq (d2m1) * (M_LOG10Eq / 2.0Q);
+ __real__ result = log1pq (d2m1) * ((__float128) M_LOG10Eq / 2);
}
- else if (absx < 1.0Q
- && absx >= 0.75Q
- && absy < FLT128_EPSILON / 2.0Q
+ else if (absx < 1
+ && absx >= 0.5Q
+ && absy < FLT128_EPSILON / 2
&& scale == 0)
{
- __float128 d2m1 = (absx - 1.0Q) * (absx + 1.0Q);
- __real__ result = log1pq (d2m1) * (M_LOG10Eq / 2.0Q);
+ __float128 d2m1 = (absx - 1) * (absx + 1);
+ __real__ result = log1pq (d2m1) * ((__float128) M_LOG10Eq / 2);
}
- else if (absx < 1.0Q && (absx >= 0.75Q || absy >= 0.5Q) && scale == 0)
+ else if (absx < 1
+ && absx >= 0.5Q
+ && scale == 0
+ && absx * absx + absy * absy >= 0.5Q)
{
__float128 d2m1 = __quadmath_x2y2m1q (absx, absy);
- __real__ result = log1pq (d2m1) * (M_LOG10Eq / 2.0Q);
+ __real__ result = log1pq (d2m1) * ((__float128) M_LOG10Eq / 2);
}
else
{
__float128 d = hypotq (absx, absy);
- __real__ result = log10q (d) - scale * M_LOG10_2q;
+ __real__ result = log10q (d) - scale * LOG10_2;
}
__imag__ result = M_LOG10Eq * atan2q (__imag__ x, __real__ x);
diff --git a/libquadmath/math/clogq.c b/libquadmath/math/clogq.c
index 1a772cd434d..b20da52dd28 100644
--- a/libquadmath/math/clogq.c
+++ b/libquadmath/math/clogq.c
@@ -1,5 +1,5 @@
-/* Compute complex natural logarithm for complex __float128.
- Copyright (C) 1997-2012 Free Software Foundation, Inc.
+/* Compute complex natural logarithm.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,7 +19,6 @@
#include "quadmath-imp.h"
-
__complex128
clogq (__complex128 x)
{
@@ -27,15 +26,15 @@ clogq (__complex128 x)
int rcls = fpclassifyq (__real__ x);
int icls = fpclassifyq (__imag__ x);
- if (__builtin_expect (rcls == QUADFP_ZERO && icls == QUADFP_ZERO, 0))
+ if (__glibc_unlikely (rcls == QUADFP_ZERO && icls == QUADFP_ZERO))
{
/* Real and imaginary part are 0.0. */
- __imag__ result = signbitq (__real__ x) ? M_PIq : 0.0Q;
+ __imag__ result = signbitq (__real__ x) ? (__float128) M_PIq : 0;
__imag__ result = copysignq (__imag__ result, __imag__ x);
/* Yes, the following line raises an exception. */
- __real__ result = -1.0Q / fabsq (__real__ x);
+ __real__ result = -1 / fabsq (__real__ x);
}
- else if (__builtin_expect (rcls != QUADFP_NAN && icls != QUADFP_NAN, 1))
+ else if (__glibc_likely (rcls != QUADFP_NAN && icls != QUADFP_NAN))
{
/* Neither real nor imaginary part is NaN. */
__float128 absx = fabsq (__real__ x), absy = fabsq (__imag__ x);
@@ -48,11 +47,11 @@ clogq (__complex128 x)
absy = t;
}
- if (absx > FLT128_MAX / 2.0)
+ if (absx > FLT128_MAX / 2)
{
scale = -1;
absx = scalbnq (absx, scale);
- absy = (absy >= FLT128_MIN * 2.0Q ? scalbnq (absy, scale) : 0.0Q);
+ absy = (absy >= FLT128_MIN * 2 ? scalbnq (absy, scale) : 0);
}
else if (absx < FLT128_MIN && absy < FLT128_MIN)
{
@@ -61,38 +60,38 @@ clogq (__complex128 x)
absy = scalbnq (absy, scale);
}
- if (absx == 1.0Q && scale == 0)
+ if (absx == 1 && scale == 0)
{
- __float128 absy2 = absy * absy;
- if (absy2 <= FLT128_MIN * 2.0Q)
- __real__ result = absy2 / 2.0Q - absy2 * absy2 / 4.0Q;
- else
- __real__ result = log1pq (absy2) / 2.0Q;
+ __real__ result = log1pq (absy * absy) / 2;
+ math_check_force_underflow_nonneg (__real__ result);
}
- else if (absx > 1.0Q && absx < 2.0Q && absy < 1.0Q && scale == 0)
+ else if (absx > 1 && absx < 2 && absy < 1 && scale == 0)
{
- __float128 d2m1 = (absx - 1.0Q) * (absx + 1.0Q);
+ __float128 d2m1 = (absx - 1) * (absx + 1);
if (absy >= FLT128_EPSILON)
d2m1 += absy * absy;
- __real__ result = log1pq (d2m1) / 2.0Q;
+ __real__ result = log1pq (d2m1) / 2;
}
- else if (absx < 1.0Q
- && absx >= 0.75Q
- && absy < FLT128_EPSILON / 2.0Q
+ else if (absx < 1
+ && absx >= 0.5Q
+ && absy < FLT128_EPSILON / 2
&& scale == 0)
{
- __float128 d2m1 = (absx - 1.0Q) * (absx + 1.0Q);
- __real__ result = log1pq (d2m1) / 2.0Q;
+ __float128 d2m1 = (absx - 1) * (absx + 1);
+ __real__ result = log1pq (d2m1) / 2;
}
- else if (absx < 1.0 && (absx >= 0.75Q || absy >= 0.5Q) && scale == 0)
+ else if (absx < 1
+ && absx >= 0.5Q
+ && scale == 0
+ && absx * absx + absy * absy >= 0.5Q)
{
__float128 d2m1 = __quadmath_x2y2m1q (absx, absy);
- __real__ result = log1pq (d2m1) / 2.0Q;
+ __real__ result = log1pq (d2m1) / 2;
}
else
{
__float128 d = hypotq (absx, absy);
- __real__ result = logq (d) - scale * M_LN2q;
+ __real__ result = logq (d) - scale * (__float128) M_LN2q;
}
__imag__ result = atan2q (__imag__ x, __real__ x);
diff --git a/libquadmath/math/conjq.c b/libquadmath/math/conjq.c
index 8587d12193b..0ab86f8ddb6 100644
--- a/libquadmath/math/conjq.c
+++ b/libquadmath/math/conjq.c
@@ -1,5 +1,5 @@
-/* Return complex conjugate of complex __float128 value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Return complex conjugate of complex float type.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
diff --git a/libquadmath/math/copysignq.c b/libquadmath/math/copysignq.c
index 054de2d2eb3..935264286eb 100644
--- a/libquadmath/math/copysignq.c
+++ b/libquadmath/math/copysignq.c
@@ -1,4 +1,4 @@
-/* copysignq.c -- __float128 version of s_copysign.c.
+/* s_copysignl.c -- long double version of s_copysign.c.
* Conversion to long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -13,14 +13,26 @@
* ====================================================
*/
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * copysignq(long double x, long double y)
+ * copysignq(x,y) returns a value with the magnitude of x and
+ * with the sign bit of y.
+ */
+
+#define NO_MATH_REDIRECT
+
#include "quadmath-imp.h"
-__float128
-copysignq (__float128 x, __float128 y)
+__float128 copysignq(__float128 x, __float128 y)
{
- uint64_t hx,hy;
- GET_FLT128_MSW64(hx,x);
- GET_FLT128_MSW64(hy,y);
- SET_FLT128_MSW64(x,(hx&0x7fffffffffffffffULL)|(hy&0x8000000000000000ULL));
- return x;
+ uint64_t hx,hy;
+ GET_FLT128_MSW64(hx,x);
+ GET_FLT128_MSW64(hy,y);
+ SET_FLT128_MSW64(x,(hx&0x7fffffffffffffffULL)
+ |(hy&0x8000000000000000ULL));
+ return x;
}
diff --git a/libquadmath/math/coshq.c b/libquadmath/math/coshq.c
index 61397509527..7664c0862ec 100644
--- a/libquadmath/math/coshq.c
+++ b/libquadmath/math/coshq.c
@@ -9,11 +9,11 @@
* ====================================================
*/
-/* Changes for 128-bit __float128 are
+/* Changes for 128-bit long double are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
+ and are incorporated herein by permission of the author. The author
reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under
+ copying permissions. These modifications are distributed here under
the following terms:
This library is free software; you can redistribute it and/or
@@ -27,34 +27,34 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
/* coshq(x)
* Method :
- * mathematically coshq(x) if defined to be (exp(x)+exp(-x))/2
- * 1. Replace x by |x| (coshq(x) = coshq(-x)).
+ * mathematically coshl(x) if defined to be (exp(x)+exp(-x))/2
+ * 1. Replace x by |x| (coshl(x) = coshl(-x)).
* 2.
* [ exp(x) - 1 ]^2
- * 0 <= x <= ln2/2 : coshq(x) := 1 + -------------------
+ * 0 <= x <= ln2/2 : coshl(x) := 1 + -------------------
* 2*exp(x)
*
* exp(x) + 1/exp(x)
- * ln2/2 <= x <= 22 : coshq(x) := -------------------
+ * ln2/2 <= x <= 22 : coshl(x) := -------------------
* 2
- * 22 <= x <= lnovft : coshq(x) := expq(x)/2
- * lnovft <= x <= ln2ovft: coshq(x) := expq(x/2)/2 * expq(x/2)
- * ln2ovft < x : coshq(x) := huge*huge (overflow)
+ * 22 <= x <= lnovft : coshl(x) := expq(x)/2
+ * lnovft <= x <= ln2ovft: coshl(x) := expq(x/2)/2 * expq(x/2)
+ * ln2ovft < x : coshl(x) := huge*huge (overflow)
*
* Special cases:
- * coshq(x) is |x| if x is +INF, -INF, or NaN.
- * only coshq(0)=1 is exact for finite x.
+ * coshl(x) is |x| if x is +INF, -INF, or NaN.
+ * only coshl(0)=1 is exact for finite x.
*/
#include "quadmath-imp.h"
-static const __float128 one = 1.0Q, half = 0.5Q, huge = 1.0e4900Q,
- ovf_thresh = 1.1357216553474703894801348310092223067821E4Q;
+static const __float128 one = 1.0, half = 0.5, huge = 1.0e4900Q,
+ovf_thresh = 1.1357216553474703894801348310092223067821E4Q;
__float128
coshq (__float128 x)
@@ -73,7 +73,7 @@ coshq (__float128 x)
if (ex >= 0x7fff0000)
return x * x;
- /* |x| in [0,0.5*ln2], return 1+expm1l(|x|)^2/(2*expq(|x|)) */
+ /* |x| in [0,0.5*ln2], return 1+expm1q(|x|)^2/(2*expq(|x|)) */
if (ex < 0x3ffd62e4) /* 0.3465728759765625 */
{
if (ex < 0x3fb80000) /* |x| < 2^-116 */
diff --git a/libquadmath/math/cosq.c b/libquadmath/math/cosq.c
index 28630b93a6f..6aabf0cc9ba 100644
--- a/libquadmath/math/cosq.c
+++ b/libquadmath/math/cosq.c
@@ -1,4 +1,4 @@
-/* cosq.c -- __float128 version of s_cos.c.
+/* s_cosl.c -- long double version of s_cos.c.
* Conversion to long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -17,8 +17,8 @@
* Return cosine function of x.
*
* kernel function:
- * __quadmath_kernel_sinq ... sine function on [-pi/4,pi/4]
- * __quadmath_kernel_cosq ... cosine function on [-pi/4,pi/4]
+ * __quadmath_kernel_sinq ... sine function on [-pi/4,pi/4]
+ * __quadmath_kernel_cosq ... cosine function on [-pi/4,pi/4]
* __quadmath_rem_pio2q ... argument reduction routine
*
* Method.
@@ -46,10 +46,9 @@
#include "quadmath-imp.h"
-__float128
-cosq (__float128 x)
+__float128 cosq(__float128 x)
{
- __float128 y[2],z=0.0Q;
+ __float128 y[2],z=0;
int64_t n, ix;
/* High word of x. */
@@ -64,6 +63,8 @@ cosq (__float128 x)
else if (ix>=0x7fff000000000000LL) {
if (ix == 0x7fff000000000000LL) {
GET_FLT128_LSW64(n,x);
+ if (n == 0)
+ errno = EDOM;
}
return x-x;
}
diff --git a/libquadmath/math/cosq_kernel.c b/libquadmath/math/cosq_kernel.c
index 42d29adfd8c..0bffbc82df9 100644
--- a/libquadmath/math/cosq_kernel.c
+++ b/libquadmath/math/cosq_kernel.c
@@ -1,5 +1,5 @@
/* Quad-precision floating point cosine on <-pi/4,pi/4>.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
@@ -70,14 +69,14 @@ static const __float128 c[] = {
-2.50521016467996193495359189395805639E-08Q, /* bfe5ae644ee90c47dc71839de75b2787 */
};
-#define SINCOSQ_COS_HI 0
-#define SINCOSQ_COS_LO 1
-#define SINCOSQ_SIN_HI 2
-#define SINCOSQ_SIN_LO 3
+#define SINCOSL_COS_HI 0
+#define SINCOSL_COS_LO 1
+#define SINCOSL_SIN_HI 2
+#define SINCOSL_SIN_LO 3
extern const __float128 __sincosq_table[];
__float128
-__quadmath_kernel_cosq (__float128 x, __float128 y)
+__quadmath_kernel_cosq(__float128 x, __float128 y)
{
__float128 h, l, z, sin_l, cos_l_m1;
int64_t ix;
@@ -98,7 +97,7 @@ __quadmath_kernel_cosq (__float128 x, __float128 y)
else
{
/* So that we don't have to use too large polynomial, we find
- l and h such that x = l + h, where fabsl(l) <= 1.0/256 with 83
+ l and h such that x = l + h, where fabsq(l) <= 1.0/256 with 83
possible values for h. We look up cosq(h) and sinq(h) in
pre-computed tables, compute cosq(l) and sinq(l) using a
Chebyshev polynomial of degree 10(11) and compute
@@ -106,10 +105,10 @@ __quadmath_kernel_cosq (__float128 x, __float128 y)
index = 0x3ffe - (tix >> 16);
hix = (tix + (0x200 << index)) & (0xfffffc00 << index);
if (signbitq (x))
- {
- x = -x;
- y = -y;
- }
+ {
+ x = -x;
+ y = -y;
+ }
switch (index)
{
case 0: index = ((45 << 10) + hix - 0x3ffe0000) >> 8; break;
@@ -123,9 +122,9 @@ __quadmath_kernel_cosq (__float128 x, __float128 y)
z = l * l;
sin_l = l*(ONE+z*(SSIN1+z*(SSIN2+z*(SSIN3+z*(SSIN4+z*SSIN5)))));
cos_l_m1 = z*(SCOS1+z*(SCOS2+z*(SCOS3+z*(SCOS4+z*SCOS5))));
- return __sincosq_table [index + SINCOSQ_COS_HI]
- + (__sincosq_table [index + SINCOSQ_COS_LO]
- - (__sincosq_table [index + SINCOSQ_SIN_HI] * sin_l
- - __sincosq_table [index + SINCOSQ_COS_HI] * cos_l_m1));
+ return __sincosq_table [index + SINCOSL_COS_HI]
+ + (__sincosq_table [index + SINCOSL_COS_LO]
+ - (__sincosq_table [index + SINCOSL_SIN_HI] * sin_l
+ - __sincosq_table [index + SINCOSL_COS_HI] * cos_l_m1));
}
}
diff --git a/libquadmath/math/cprojq.c b/libquadmath/math/cprojq.c
index 6092c732503..0497760aced 100644
--- a/libquadmath/math/cprojq.c
+++ b/libquadmath/math/cprojq.c
@@ -1,5 +1,5 @@
-/* Compute projection of complex __float128 value to Riemann sphere.
- Copyright (C) 1997, 1999, 2010 Free Software Foundation, Inc.
+/* Compute projection of complex float type value to Riemann sphere.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -14,24 +14,20 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
-
__complex128
cprojq (__complex128 x)
{
- if (isnanq (__real__ x) && isnanq (__imag__ x))
- return x;
- else if (!finiteq (__real__ x) || !finiteq (__imag__ x))
+ if (isinfq (__real__ x) || isinfq (__imag__ x))
{
__complex128 res;
__real__ res = __builtin_inf ();
- __imag__ res = copysignq (0.0, __imag__ x);
+ __imag__ res = copysignq (0, __imag__ x);
return res;
}
diff --git a/libquadmath/math/crealq.c b/libquadmath/math/crealq.c
index 71f4a4405aa..2577d31aa24 100644
--- a/libquadmath/math/crealq.c
+++ b/libquadmath/math/crealq.c
@@ -1,5 +1,5 @@
-/* Return real part of complex __float128 value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Return real part of complex float type.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
diff --git a/libquadmath/math/csinhq.c b/libquadmath/math/csinhq.c
index c16d576f4da..bfe740b4ec9 100644
--- a/libquadmath/math/csinhq.c
+++ b/libquadmath/math/csinhq.c
@@ -1,5 +1,5 @@
-/* Complex sine hyperbole function for complex __float128.
- Copyright (C) 1997-2012 Free Software Foundation, Inc.
+/* Complex sine hyperbole function for float types.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,11 +19,6 @@
#include "quadmath-imp.h"
-#ifdef HAVE_FENV_H
-# include <fenv.h>
-#endif
-
-
__complex128
csinhq (__complex128 x)
{
@@ -34,25 +29,28 @@ csinhq (__complex128 x)
__real__ x = fabsq (__real__ x);
- if (__builtin_expect (rcls >= QUADFP_ZERO, 1))
+ if (__glibc_likely (rcls >= QUADFP_ZERO))
{
/* Real part is finite. */
- if (__builtin_expect (icls >= QUADFP_ZERO, 1))
+ if (__glibc_likely (icls >= QUADFP_ZERO))
{
/* Imaginary part is finite. */
const int t = (int) ((FLT128_MAX_EXP - 1) * M_LN2q);
__float128 sinix, cosix;
- if (__builtin_expect (icls != QUADFP_SUBNORMAL, 1))
+ if (__glibc_likely (fabsq (__imag__ x) > FLT128_MIN))
{
sincosq (__imag__ x, &sinix, &cosix);
}
else
{
sinix = __imag__ x;
- cosix = 1.0Q;
+ cosix = 1;
}
+ if (negate)
+ cosix = -cosix;
+
if (fabsq (__real__ x) > t)
{
__float128 exp_t = expq (t);
@@ -60,8 +58,8 @@ csinhq (__complex128 x)
if (signbitq (__real__ x))
cosix = -cosix;
rx -= t;
- sinix *= exp_t / 2.0Q;
- cosix *= exp_t / 2.0Q;
+ sinix *= exp_t / 2;
+ cosix *= exp_t / 2;
if (rx > t)
{
rx -= t;
@@ -87,49 +85,41 @@ csinhq (__complex128 x)
__imag__ retval = coshq (__real__ x) * sinix;
}
- if (negate)
- __real__ retval = -__real__ retval;
+ math_check_force_underflow_complex (retval);
}
else
{
if (rcls == QUADFP_ZERO)
{
/* Real part is 0.0. */
- __real__ retval = copysignq (0.0Q, negate ? -1.0Q : 1.0Q);
- __imag__ retval = nanq ("") + nanq ("");
-
-#ifdef HAVE_FENV_H
- if (icls == QUADFP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
+ __real__ retval = copysignq (0, negate ? -1 : 1);
+ __imag__ retval = __imag__ x - __imag__ x;
}
else
{
__real__ retval = nanq ("");
__imag__ retval = nanq ("");
-#ifdef HAVE_FENV_H
feraiseexcept (FE_INVALID);
-#endif
}
}
}
else if (rcls == QUADFP_INFINITE)
{
/* Real part is infinite. */
- if (__builtin_expect (icls > QUADFP_ZERO, 1))
+ if (__glibc_likely (icls > QUADFP_ZERO))
{
/* Imaginary part is finite. */
__float128 sinix, cosix;
- if (__builtin_expect (icls != QUADFP_SUBNORMAL, 1))
+ if (__glibc_likely (fabsq (__imag__ x) > FLT128_MIN))
{
sincosq (__imag__ x, &sinix, &cosix);
}
else
{
sinix = __imag__ x;
- cosix = 1.0;
+ cosix = 1;
}
__real__ retval = copysignq (HUGE_VALQ, cosix);
@@ -146,20 +136,14 @@ csinhq (__complex128 x)
}
else
{
- /* The addition raises the invalid exception. */
__real__ retval = HUGE_VALQ;
- __imag__ retval = nanq ("") + nanq ("");
-
-#ifdef HAVE_FENV_H
- if (icls == QUADFP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
+ __imag__ retval = __imag__ x - __imag__ x;
}
}
else
{
__real__ retval = nanq ("");
- __imag__ retval = __imag__ x == 0.0Q ? __imag__ x : nanq ("");
+ __imag__ retval = __imag__ x == 0 ? __imag__ x : nanq ("");
}
return retval;
diff --git a/libquadmath/math/csinq.c b/libquadmath/math/csinq.c
index c837e50b87f..a38da8eebc5 100644
--- a/libquadmath/math/csinq.c
+++ b/libquadmath/math/csinq.c
@@ -1,5 +1,5 @@
-/* Complex sine function for complex __float128.
- Copyright (C) 1997-2012 Free Software Foundation, Inc.
+/* Complex sine function for float types.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,11 +19,6 @@
#include "quadmath-imp.h"
-#ifdef HAVE_FENV_H
-# include <fenv.h>
-#endif
-
-
__complex128
csinq (__complex128 x)
{
@@ -34,25 +29,28 @@ csinq (__complex128 x)
__real__ x = fabsq (__real__ x);
- if (__builtin_expect (icls >= QUADFP_ZERO, 1))
+ if (__glibc_likely (icls >= QUADFP_ZERO))
{
/* Imaginary part is finite. */
- if (__builtin_expect (rcls >= QUADFP_ZERO, 1))
+ if (__glibc_likely (rcls >= QUADFP_ZERO))
{
/* Real part is finite. */
const int t = (int) ((FLT128_MAX_EXP - 1) * M_LN2q);
__float128 sinix, cosix;
- if (__builtin_expect (rcls != QUADFP_SUBNORMAL, 1))
+ if (__glibc_likely (__real__ x > FLT128_MIN))
{
sincosq (__real__ x, &sinix, &cosix);
}
else
{
sinix = __real__ x;
- cosix = 1.0Q;
+ cosix = 1;
}
+ if (negate)
+ sinix = -sinix;
+
if (fabsq (__imag__ x) > t)
{
__float128 exp_t = expq (t);
@@ -60,8 +58,8 @@ csinq (__complex128 x)
if (signbitq (__imag__ x))
cosix = -cosix;
ix -= t;
- sinix *= exp_t / 2.0Q;
- cosix *= exp_t / 2.0Q;
+ sinix *= exp_t / 2;
+ cosix *= exp_t / 2;
if (ix > t)
{
ix -= t;
@@ -87,30 +85,22 @@ csinq (__complex128 x)
__imag__ retval = sinhq (__imag__ x) * cosix;
}
- if (negate)
- __real__ retval = -__real__ retval;
+ math_check_force_underflow_complex (retval);
}
else
{
if (icls == QUADFP_ZERO)
{
/* Imaginary part is 0.0. */
- __real__ retval = nanq ("");
+ __real__ retval = __real__ x - __real__ x;
__imag__ retval = __imag__ x;
-
-#ifdef HAVE_FENV_H
- if (rcls == QUADFP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
}
else
{
__real__ retval = nanq ("");
__imag__ retval = nanq ("");
-#ifdef HAVE_FENV_H
feraiseexcept (FE_INVALID);
-#endif
}
}
}
@@ -120,7 +110,7 @@ csinq (__complex128 x)
if (rcls == QUADFP_ZERO)
{
/* Real part is 0.0. */
- __real__ retval = copysignq (0.0Q, negate ? -1.0Q : 1.0Q);
+ __real__ retval = copysignq (0, negate ? -1 : 1);
__imag__ retval = __imag__ x;
}
else if (rcls > QUADFP_ZERO)
@@ -128,14 +118,14 @@ csinq (__complex128 x)
/* Real part is finite. */
__float128 sinix, cosix;
- if (__builtin_expect (rcls != QUADFP_SUBNORMAL, 1))
+ if (__glibc_likely (__real__ x > FLT128_MIN))
{
sincosq (__real__ x, &sinix, &cosix);
}
else
{
sinix = __real__ x;
- cosix = 1.0;
+ cosix = 1;
}
__real__ retval = copysignq (HUGE_VALQ, sinix);
@@ -148,20 +138,14 @@ csinq (__complex128 x)
}
else
{
- /* The addition raises the invalid exception. */
- __real__ retval = nanq ("");
+ __real__ retval = __real__ x - __real__ x;
__imag__ retval = HUGE_VALQ;
-
-#ifdef HAVE_FENV_H
- if (rcls == QUADFP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
}
}
else
{
if (rcls == QUADFP_ZERO)
- __real__ retval = copysignq (0.0Q, negate ? -1.0Q : 1.0Q);
+ __real__ retval = copysignq (0, negate ? -1 : 1);
else
__real__ retval = nanq ("");
__imag__ retval = nanq ("");
diff --git a/libquadmath/math/csqrtq.c b/libquadmath/math/csqrtq.c
index 5279e4378a2..2add9dba788 100644
--- a/libquadmath/math/csqrtq.c
+++ b/libquadmath/math/csqrtq.c
@@ -1,5 +1,5 @@
-/* Complex square root of __float128 value.
- Copyright (C) 1997-2012 Free Software Foundation, Inc.
+/* Complex square root of a float type.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,11 +20,6 @@
#include "quadmath-imp.h"
-#ifdef HAVE_FENV_H
-# include <fenv.h>
-#endif
-
-
__complex128
csqrtq (__complex128 x)
{
@@ -32,7 +27,7 @@ csqrtq (__complex128 x)
int rcls = fpclassifyq (__real__ x);
int icls = fpclassifyq (__imag__ x);
- if (__builtin_expect (rcls <= QUADFP_INFINITE || icls <= QUADFP_INFINITE, 0))
+ if (__glibc_unlikely (rcls <= QUADFP_INFINITE || icls <= QUADFP_INFINITE))
{
if (icls == QUADFP_INFINITE)
{
@@ -41,7 +36,7 @@ csqrtq (__complex128 x)
}
else if (rcls == QUADFP_INFINITE)
{
- if (__real__ x < 0.0Q)
+ if (__real__ x < 0)
{
__real__ res = icls == QUADFP_NAN ? nanq ("") : 0;
__imag__ res = copysignq (HUGE_VALQ, __imag__ x);
@@ -50,7 +45,7 @@ csqrtq (__complex128 x)
{
__real__ res = __real__ x;
__imag__ res = (icls == QUADFP_NAN
- ? nanq ("") : copysignq (0.0Q, __imag__ x));
+ ? nanq ("") : copysignq (0, __imag__ x));
}
}
else
@@ -61,27 +56,26 @@ csqrtq (__complex128 x)
}
else
{
- if (__builtin_expect (icls == QUADFP_ZERO, 0))
+ if (__glibc_unlikely (icls == QUADFP_ZERO))
{
- if (__real__ x < 0.0Q)
+ if (__real__ x < 0)
{
- __real__ res = 0.0Q;
- __imag__ res = copysignq (sqrtq (-__real__ x),
- __imag__ x);
+ __real__ res = 0;
+ __imag__ res = copysignq (sqrtq (-__real__ x), __imag__ x);
}
else
{
__real__ res = fabsq (sqrtq (__real__ x));
- __imag__ res = copysignq (0.0Q, __imag__ x);
+ __imag__ res = copysignq (0, __imag__ x);
}
}
- else if (__builtin_expect (rcls == QUADFP_ZERO, 0))
+ else if (__glibc_unlikely (rcls == QUADFP_ZERO))
{
__float128 r;
- if (fabsq (__imag__ x) >= 2.0Q * FLT128_MIN)
+ if (fabsq (__imag__ x) >= 2 * FLT128_MIN)
r = sqrtq (0.5Q * fabsq (__imag__ x));
else
- r = 0.5Q * sqrtq (2.0Q * fabsq (__imag__ x));
+ r = 0.5Q * sqrtq (2 * fabsq (__imag__ x));
__real__ res = r;
__imag__ res = copysignq (r, __imag__ x);
@@ -91,25 +85,25 @@ csqrtq (__complex128 x)
__float128 d, r, s;
int scale = 0;
- if (fabsq (__real__ x) > FLT128_MAX / 4.0Q)
+ if (fabsq (__real__ x) > FLT128_MAX / 4)
{
scale = 1;
__real__ x = scalbnq (__real__ x, -2 * scale);
__imag__ x = scalbnq (__imag__ x, -2 * scale);
}
- else if (fabsq (__imag__ x) > FLT128_MAX / 4.0Q)
+ else if (fabsq (__imag__ x) > FLT128_MAX / 4)
{
scale = 1;
- if (fabsq (__real__ x) >= 4.0Q * FLT128_MIN)
+ if (fabsq (__real__ x) >= 4 * FLT128_MIN)
__real__ x = scalbnq (__real__ x, -2 * scale);
else
- __real__ x = 0.0Q;
+ __real__ x = 0;
__imag__ x = scalbnq (__imag__ x, -2 * scale);
}
- else if (fabsq (__real__ x) < FLT128_MIN
- && fabsq (__imag__ x) < FLT128_MIN)
+ else if (fabsq (__real__ x) < 2 * FLT128_MIN
+ && fabsq (__imag__ x) < 2 * FLT128_MIN)
{
- scale = -(FLT128_MANT_DIG / 2);
+ scale = -((FLT128_MANT_DIG + 1) / 2);
__real__ x = scalbnq (__real__ x, -2 * scale);
__imag__ x = scalbnq (__imag__ x, -2 * scale);
}
@@ -120,12 +114,28 @@ csqrtq (__complex128 x)
if (__real__ x > 0)
{
r = sqrtq (0.5Q * (d + __real__ x));
- s = 0.5Q * (__imag__ x / r);
+ if (scale == 1 && fabsq (__imag__ x) < 1)
+ {
+ /* Avoid possible intermediate underflow. */
+ s = __imag__ x / r;
+ r = scalbnq (r, scale);
+ scale = 0;
+ }
+ else
+ s = 0.5Q * (__imag__ x / r);
}
else
{
s = sqrtq (0.5Q * (d - __real__ x));
- r = fabsq (0.5Q * (__imag__ x / s));
+ if (scale == 1 && fabsq (__imag__ x) < 1)
+ {
+ /* Avoid possible intermediate underflow. */
+ r = fabsq (__imag__ x / s);
+ s = scalbnq (s, scale);
+ scale = 0;
+ }
+ else
+ r = fabsq (0.5Q * (__imag__ x / s));
}
if (scale)
@@ -134,6 +144,9 @@ csqrtq (__complex128 x)
s = scalbnq (s, scale);
}
+ math_check_force_underflow (r);
+ math_check_force_underflow (s);
+
__real__ res = r;
__imag__ res = copysignq (s, __imag__ x);
}
diff --git a/libquadmath/math/ctanhq.c b/libquadmath/math/ctanhq.c
index 8934cfad59f..cb077f26b80 100644
--- a/libquadmath/math/ctanhq.c
+++ b/libquadmath/math/ctanhq.c
@@ -1,5 +1,5 @@
-/* Complex hyperbole tangent for __float128.
- Copyright (C) 1997-2012 Free Software Foundation, Inc.
+/* Complex hyperbolic tangent for float types.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,36 +19,39 @@
#include "quadmath-imp.h"
-#ifdef HAVE_FENV_H
-# include <fenv.h>
-#endif
-
-
__complex128
ctanhq (__complex128 x)
{
__complex128 res;
- if (__builtin_expect (!finiteq (__real__ x) || !finiteq (__imag__ x), 0))
+ if (__glibc_unlikely (!finiteq (__real__ x) || !finiteq (__imag__ x)))
{
- if (__quadmath_isinf_nsq (__real__ x))
+ if (isinfq (__real__ x))
{
- __real__ res = copysignq (1.0Q, __real__ x);
- __imag__ res = copysignq (0.0Q, __imag__ x);
+ __real__ res = copysignq (1, __real__ x);
+ if (finiteq (__imag__ x) && fabsq (__imag__ x) > 1)
+ {
+ __float128 sinix, cosix;
+ sincosq (__imag__ x, &sinix, &cosix);
+ __imag__ res = copysignq (0, sinix * cosix);
+ }
+ else
+ __imag__ res = copysignq (0, __imag__ x);
}
- else if (__imag__ x == 0.0Q)
+ else if (__imag__ x == 0)
{
res = x;
}
else
{
- __real__ res = nanq ("");
+ if (__real__ x == 0)
+ __real__ res = __real__ x;
+ else
+ __real__ res = nanq ("");
__imag__ res = nanq ("");
-#ifdef HAVE_FENV_H
- if (__quadmath_isinf_nsq (__imag__ x))
+ if (isinfq (__imag__ x))
feraiseexcept (FE_INVALID);
-#endif
}
}
else
@@ -56,19 +59,18 @@ ctanhq (__complex128 x)
__float128 sinix, cosix;
__float128 den;
const int t = (int) ((FLT128_MAX_EXP - 1) * M_LN2q / 2);
- int icls = fpclassifyq (__imag__ x);
/* tanh(x+iy) = (sinh(2x) + i*sin(2y))/(cosh(2x) + cos(2y))
= (sinh(x)*cosh(x) + i*sin(y)*cos(y))/(sinh(x)^2 + cos(y)^2). */
- if (__builtin_expect (icls != QUADFP_SUBNORMAL, 1))
+ if (__glibc_likely (fabsq (__imag__ x) > FLT128_MIN))
{
sincosq (__imag__ x, &sinix, &cosix);
}
else
{
sinix = __imag__ x;
- cosix = 1.0Q;
+ cosix = 1;
}
if (fabsq (__real__ x) > t)
@@ -79,7 +81,7 @@ ctanhq (__complex128 x)
sin(y)*cos(y)/sinh(x)^2 = 4*sin(y)*cos(y)/exp(2x). */
__float128 exp_2t = expq (2 * t);
- __real__ res = copysignq (1.0, __real__ x);
+ __real__ res = copysignq (1, __real__ x);
__imag__ res = 4 * sinix * cosix;
__real__ x = fabsq (__real__ x);
__real__ x -= t;
@@ -104,7 +106,7 @@ ctanhq (__complex128 x)
else
{
sinhrx = __real__ x;
- coshrx = 1.0Q;
+ coshrx = 1;
}
if (fabsq (sinhrx) > fabsq (cosix) * FLT128_EPSILON)
@@ -114,6 +116,7 @@ ctanhq (__complex128 x)
__real__ res = sinhrx * coshrx / den;
__imag__ res = sinix * cosix / den;
}
+ math_check_force_underflow_complex (res);
}
return res;
diff --git a/libquadmath/math/ctanq.c b/libquadmath/math/ctanq.c
index d390511ca20..e50b548f125 100644
--- a/libquadmath/math/ctanq.c
+++ b/libquadmath/math/ctanq.c
@@ -1,5 +1,5 @@
-/* Complex tangent function for complex __float128.
- Copyright (C) 1997-2012 Free Software Foundation, Inc.
+/* Complex tangent function for a complex float type.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,56 +19,58 @@
#include "quadmath-imp.h"
-#ifdef HAVE_FENV_H
-# include <fenv.h>
-#endif
-
-
__complex128
ctanq (__complex128 x)
{
__complex128 res;
- if (__builtin_expect (!finiteq (__real__ x) || !finiteq (__imag__ x), 0))
+ if (__glibc_unlikely (!finiteq (__real__ x) || !finiteq (__imag__ x)))
{
- if (__quadmath_isinf_nsq (__imag__ x))
+ if (isinfq (__imag__ x))
{
- __real__ res = copysignq (0.0Q, __real__ x);
- __imag__ res = copysignq (1.0Q, __imag__ x);
+ if (finiteq (__real__ x) && fabsq (__real__ x) > 1)
+ {
+ __float128 sinrx, cosrx;
+ sincosq (__real__ x, &sinrx, &cosrx);
+ __real__ res = copysignq (0, sinrx * cosrx);
+ }
+ else
+ __real__ res = copysignq (0, __real__ x);
+ __imag__ res = copysignq (1, __imag__ x);
}
- else if (__real__ x == 0.0Q)
+ else if (__real__ x == 0)
{
res = x;
}
else
{
__real__ res = nanq ("");
- __imag__ res = nanq ("");
+ if (__imag__ x == 0)
+ __imag__ res = __imag__ x;
+ else
+ __imag__ res = nanq ("");
-#ifdef HAVE_FENV_H
- if (__quadmath_isinf_nsq (__real__ x))
+ if (isinfq (__real__ x))
feraiseexcept (FE_INVALID);
-#endif
}
}
else
{
__float128 sinrx, cosrx;
__float128 den;
- const int t = (int) ((FLT128_MAX_EXP - 1) * M_LN2q / 2.0Q);
- int rcls = fpclassifyq (__real__ x);
+ const int t = (int) ((FLT128_MAX_EXP - 1) * M_LN2q / 2);
/* tan(x+iy) = (sin(2x) + i*sinh(2y))/(cos(2x) + cosh(2y))
= (sin(x)*cos(x) + i*sinh(y)*cosh(y)/(cos(x)^2 + sinh(y)^2). */
- if (__builtin_expect (rcls != QUADFP_SUBNORMAL, 1))
+ if (__glibc_likely (fabsq (__real__ x) > FLT128_MIN))
{
sincosq (__real__ x, &sinrx, &cosrx);
}
else
{
sinrx = __real__ x;
- cosrx = 1.0Q;
+ cosrx = 1;
}
if (fabsq (__imag__ x) > t)
@@ -79,7 +81,7 @@ ctanq (__complex128 x)
sin(x)*cos(x)/sinh(y)^2 = 4*sin(x)*cos(x)/exp(2y). */
__float128 exp_2t = expq (2 * t);
- __imag__ res = copysignq (1.0Q, __imag__ x);
+ __imag__ res = copysignq (1, __imag__ x);
__real__ res = 4 * sinrx * cosrx;
__imag__ x = fabsq (__imag__ x);
__imag__ x -= t;
@@ -104,7 +106,7 @@ ctanq (__complex128 x)
else
{
sinhix = __imag__ x;
- coshix = 1.0Q;
+ coshix = 1;
}
if (fabsq (sinhix) > fabsq (cosrx) * FLT128_EPSILON)
@@ -114,6 +116,7 @@ ctanq (__complex128 x)
__real__ res = sinrx * cosrx / den;
__imag__ res = sinhix * coshix / den;
}
+ math_check_force_underflow_complex (res);
}
return res;
diff --git a/libquadmath/math/erfq.c b/libquadmath/math/erfq.c
index 45a8c014e5c..82a65ab1e1e 100644
--- a/libquadmath/math/erfq.c
+++ b/libquadmath/math/erfq.c
@@ -27,11 +27,11 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
-/* __float128 erfq(__float128 x)
- * __float128 erfcq(__float128 x)
+/* double erf(double x)
+ * double erfc(double x)
* x
* 2 |\
* erf(x) = --------- | exp(-t*t)dt
@@ -96,14 +96,8 @@
* erfc/erf(NaN) is NaN
*/
-#include <errno.h>
#include "quadmath-imp.h"
-
-
-__float128 erfcq (__float128);
-
-
/* Evaluate P[n] x^n + P[n-1] x^(n-1) + ... + P[0] */
static __float128
@@ -143,8 +137,8 @@ deval (__float128 x, const __float128 *p, int n)
static const __float128
tiny = 1e-4931Q,
- one = 1.0Q,
- two = 2.0Q,
+ one = 1,
+ two = 2,
/* 2/sqrt(pi) - 1 */
efx = 1.2837916709551257389615890312154517168810E-1Q;
@@ -810,7 +804,7 @@ erfq (__float128 x)
__float128
erfcq (__float128 x)
{
- __float128 y = 0.0Q, z, p, r;
+ __float128 y, z, p, r;
int32_t i, ix, sign;
ieee854_float128 u;
@@ -868,7 +862,7 @@ erfcq (__float128 x)
y += C18a;
break;
case 8:
- z = x - 1.0Q;
+ z = x - 1;
y = C19b + z * neval (z, RNr19, NRNr19) / deval (z, RDr19, NRDr19);
y += C19a;
break;
@@ -879,7 +873,7 @@ erfcq (__float128 x)
break;
}
if (sign & 0x80000000)
- y = 2.0Q - y;
+ y = 2 - y;
return y;
}
/* 1.25 < |x| < 107 */
@@ -924,7 +918,8 @@ erfcq (__float128 x)
u.words32.w3 = 0;
u.words32.w2 &= 0xfe000000;
z = u.value;
- r = expq (-z * z - 0.5625) * expq ((z - x) * (z + x) + p);
+ r = expq (-z * z - 0.5625) *
+ expq ((z - x) * (z + x) + p);
if ((sign & 0x80000000) == 0)
{
__float128 ret = r / x;
diff --git a/libquadmath/math/exp2q.c b/libquadmath/math/exp2q.c
new file mode 100644
index 00000000000..f012264a3df
--- /dev/null
+++ b/libquadmath/math/exp2q.c
@@ -0,0 +1,51 @@
+/* Compute 2^x.
+ Copyright (C) 2012-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "quadmath-imp.h"
+
+__float128
+exp2q (__float128 x)
+{
+ if (__glibc_likely (__builtin_isless (x, (__float128) FLT128_MAX_EXP)))
+ {
+ if (__builtin_expect (__builtin_isgreaterequal (x, (__float128) (FLT128_MIN_EXP - FLT128_MANT_DIG
+ - 1)), 1))
+ {
+ int intx = (int) x;
+ __float128 fractx = x - intx;
+ __float128 result;
+ if (fabsq (fractx) < FLT128_EPSILON / 4)
+ result = scalbnq (1 + fractx, intx);
+ else
+ result = scalbnq (expq (M_LN2q * fractx), intx);
+ math_check_force_underflow_nonneg (result);
+ return result;
+ }
+ else
+ {
+ /* Underflow or exact zero. */
+ if (isinfq (x))
+ return 0;
+ else
+ return FLT128_MIN * FLT128_MIN;
+ }
+ }
+ else
+ /* Infinity, NaN or overflow. */
+ return FLT128_MAX * x;
+}
diff --git a/libquadmath/math/expm1q.c b/libquadmath/math/expm1q.c
index 9060d480858..f64d8d56b7c 100644
--- a/libquadmath/math/expm1q.c
+++ b/libquadmath/math/expm1q.c
@@ -1,15 +1,15 @@
-/* expm1l.c
+/* expm1q.c
*
* Exponential function, minus 1
- * 128-bit __float128 precision
+ * 128-bit long double precision
*
*
*
* SYNOPSIS:
*
- * __float128 x, y, expm1l();
+ * long double x, y, expm1q();
*
- * y = expm1l( x );
+ * y = expm1q( x );
*
*
*
@@ -48,12 +48,9 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
-
-
-#include <errno.h>
#include "quadmath-imp.h"
/* exp(x) - 1 = x + 0.5 x^2 + x^3 P(x)/Q(x)
@@ -83,7 +80,7 @@ static const __float128
C1 = 6.93145751953125E-1Q,
C2 = 1.428606820309417232121458176568075500134E-6Q,
/* ln 2^-114 */
- minarg = -7.9018778583833765273564461846232128760607E1Q;
+ minarg = -7.9018778583833765273564461846232128760607E1Q, big = 1e4932Q;
__float128
@@ -108,7 +105,7 @@ expm1q (__float128 x)
{
/* Infinity (which must be negative infinity). */
if (((ix & 0xffff) | u.words32.w1 | u.words32.w2 | u.words32.w3) == 0)
- return -1.0Q;
+ return -1;
/* NaN. Invalid exception if signaling. */
return x + x;
}
@@ -119,7 +116,7 @@ expm1q (__float128 x)
/* Minimum value. */
if (x < minarg)
- return (4.0/HUGE_VALQ - 1.0Q);
+ return (4.0/big - 1);
/* Avoid internal underflow when result does not underflow, while
ensuring underflow (without returning a zero of the wrong sign)
@@ -156,7 +153,7 @@ expm1q (__float128 x)
exp(x) - 1 = 2^k (qx + 1) - 1
= 2^k qx + 2^k - 1. */
- px = ldexpq (1.0Q, k);
+ px = ldexpq (1, k);
x = px * qx + (px - 1.0);
return x;
}
diff --git a/libquadmath/math/expq.c b/libquadmath/math/expq.c
index 5df6cd8e192..1aaad91c244 100644
--- a/libquadmath/math/expq.c
+++ b/libquadmath/math/expq.c
@@ -1,5 +1,5 @@
/* Quad-precision floating point e^x.
- Copyright (C) 1999-2017 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>
Partly based on double-precision code
@@ -16,977 +16,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "quadmath-imp.h"
-#ifdef HAVE_FENV_H
-# include <fenv.h>
-# if defined HAVE_FEHOLDEXCEPT && defined HAVE_FESETROUND \
- && defined HAVE_FESETENV && defined FE_TONEAREST
-# define USE_FENV_H
-# endif
-#endif
-
-
-/* __expq_table basically consists of four tables, T_EXPL_ARG{1,2} and
- T_EXPL_RES{1,2}. All tables use positive and negative indexes, the 0 points
- are marked by T_EXPL_* defines.
- For ARG1 and RES1 tables lets B be 89 and S 256.0, for ARG2 and RES2 B is 65
- and S 32768.0.
- These table have the property that, for all integers -B <= i <= B
- expl(__expq_table[T_EXPL_ARGN+2*i]+__expq_table[T_EXPL_ARGN+2*i+1]+r) ==
- __expq_table[T_EXPL_RESN+i], __expq_table[T_EXPL_RESN+i] is some exact number
- with the low 58 bits of the mantissa 0,
- __expq_table[T_EXPL_ARGN+2*i] == i/S+s
- where absl(s) <= 2^-54 and absl(r) <= 2^-212. */
-
-static const __float128 __expq_table [] = {
- -3.47656250000000000584188889839535373E-01Q, /* bffd640000000000002b1b04213cf000 */
- 6.90417668990715641167244540876988960E-32Q, /* 3f97667c3fdb588a6ae1af8748357a17 */
- -3.43749999999999981853132895957607418E-01Q, /* bffd5ffffffffffffac4ff5f4050b000 */
- -7.16021898043268093462818380603370350E-33Q, /* bf94296c8219427edc1431ac2498583e */
- -3.39843750000000013418643523138766329E-01Q, /* bffd5c000000000003de1f027a30e000 */
- 8.16920774283317801641347327589583265E-32Q, /* 3f97a82b65774bdca1b4440d749ed8d3 */
- -3.35937500000000014998092453039303051E-01Q, /* bffd5800000000000452a9f4d8857000 */
- -6.55865578425428447938248396879359670E-32Q, /* bf97548b7d240f3d034b395e6eecfac8 */
- -3.32031250000000000981984049529998541E-01Q, /* bffd540000000000004875277cda5000 */
- 6.91213046334032232108944519541512737E-32Q, /* 3f9766e5f925338a19045c94443b66e1 */
- -3.28124999999999986646017645350399708E-01Q, /* bffd4ffffffffffffc26a667bf44d000 */
- -6.16281060996110316602421505683742661E-32Q, /* bf973ffdcdcffb6fbffc86b2b8d42f5d */
- -3.24218749999999991645717430645867963E-01Q, /* bffd4bfffffffffffd97901063e48000 */
- -7.90797211087760527593856542417304137E-32Q, /* bf979a9afaaca1ada6a8ed1c80584d60 */
- -3.20312499999999998918211610690789652E-01Q, /* bffd47ffffffffffffb02d9856d71000 */
- 8.64024799457616856987630373786503376E-32Q, /* 3f97c0a098623f95579d5d9b2b67342d */
- -3.16406249999999998153974811017181883E-01Q, /* bffd43ffffffffffff77c991f1076000 */
- -2.73176610180696076418536105483668404E-32Q, /* bf961baeccb32f9b1fcbb8e60468e95a */
- -3.12500000000000011420976192575972779E-01Q, /* bffd400000000000034ab8240483d000 */
- 7.16573502812389453744433792609989420E-32Q, /* 3f977410f4c2cfc4335f28446c0fb363 */
- -3.08593750000000001735496343854851414E-01Q, /* bffd3c000000000000800e995c176000 */
- -1.56292999645122272621237565671593071E-32Q, /* bf95449b9cbdaff6ac1246adb2c826ac */
- -3.04687499999999982592401295899221626E-01Q, /* bffd37fffffffffffafb8bc1e061a000 */
- 6.48993208584888904958594509625158417E-32Q, /* 3f9750f9fe8366d82d77afa0031a92e1 */
- -3.00781249999999999230616898937763959E-01Q, /* bffd33ffffffffffffc73ac39da54000 */
- 6.57082437496961397305801409357792029E-32Q, /* 3f97552d3cb598ea80135cf3feb27ec4 */
- -2.96874999999999998788769281703245722E-01Q, /* bffd2fffffffffffffa6a07fa5021000 */
- -3.26588297198283968096426564544269170E-32Q, /* bf9653260fc1802f46b629aee171809b */
- -2.92968750000000015318089182805941695E-01Q, /* bffd2c0000000000046a468614bd6000 */
- -1.73291974845198589684358727559290718E-32Q, /* bf9567e9d158f52e483c8d8dcb5961dd */
- -2.89062500000000007736778942676309681E-01Q, /* bffd280000000000023adf9f4c3d3000 */
- -6.83629745986675744404029225571026236E-32Q, /* bf9762f5face6281c1daf1c6aedbdb45 */
- -2.85156250000000001367091555763661937E-01Q, /* bffd2400000000000064dfa11e3fb000 */
- -5.44898442619766878281110054067026237E-32Q, /* bf971aed6d2db9f542986a785edae072 */
- -2.81249999999999986958718100227029406E-01Q, /* bffd1ffffffffffffc3db9265ca9d000 */
- 1.13007318374506125723591889451107046E-32Q, /* 3f94d569fe387f456a97902907ac3856 */
- -2.77343750000000000356078829380495179E-01Q, /* bffd1c0000000000001a462390083000 */
- -4.98979365468978332358409063436543102E-32Q, /* bf970315bbf3e0d14b5c94c900702d4c */
- -2.73437499999999990276993957508540484E-01Q, /* bffd17fffffffffffd32919bcdc94000 */
- -8.79390484115892344533724650295100871E-32Q, /* bf97c89b0b89cc19c3ab2b60da9bbbc3 */
- -2.69531250000000002434203866460082225E-01Q, /* bffd14000000000000b39ccf9e130000 */
- 9.44060754687026590886751809927191596E-32Q, /* 3f97ea2f32cfecca5c64a26137a9210f */
- -2.65624999999999997296320716986257179E-01Q, /* bffd0fffffffffffff3880f13a2bc000 */
- 2.07142664067265697791007875348396921E-32Q, /* 3f95ae37ee685b9122fbe377bd205ee4 */
- -2.61718750000000010237478733739017956E-01Q, /* bffd0c000000000002f3648179d40000 */
- -6.10552936159265665298996309192680256E-32Q, /* bf973d0467d31e407515a3cca0f3b4e2 */
- -2.57812500000000011948220522778370303E-01Q, /* bffd08000000000003719f81275bd000 */
- 6.72477169058908902499239631466443836E-32Q, /* 3f975d2b8c475d3160cf72d227d8e6f9 */
- -2.53906249999999991822993360536596860E-01Q, /* bffd03fffffffffffda4a4b62f818000 */
- -2.44868296623215865054704392917190994E-32Q, /* bf95fc92516c6d057d29fc2528855976 */
- -2.49999999999999986862019457428548084E-01Q, /* bffcfffffffffffff86d2d20d5ff4000 */
- -3.85302898949105073614122724961613078E-32Q, /* bf96901f147cb7d643af71b6129ce929 */
- -2.46093750000000000237554160737318435E-01Q, /* bffcf8000000000000230e8ade26b000 */
- -1.52823675242678363494345369284988589E-32Q, /* bf953d6700c5f3fc303f79d0ec8c680a */
- -2.42187500000000003023380963205457065E-01Q, /* bffcf0000000000001be2c1a78bb0000 */
- -7.78402037952209709489481182714311699E-34Q, /* bf9102ab1f3998e887f0ee4cf940faa5 */
- -2.38281249999999995309623303145485725E-01Q, /* bffce7fffffffffffd4bd2940f43f000 */
- -3.54307216794236899443913216397197696E-32Q, /* bf966fef03ab69c3f289436205b21d02 */
- -2.34374999999999998425804947623207526E-01Q, /* bffcdfffffffffffff17b097a6092000 */
- -2.86038428948386602859761879407549696E-32Q, /* bf96290a0eba0131efe3a05fe188f2e3 */
- -2.30468749999999993822207406785200832E-01Q, /* bffcd7fffffffffffc70519834eae000 */
- -2.54339521031747516806893838749365762E-32Q, /* bf96081f0ad7f9107ae6cddb32c178ab */
- -2.26562499999999997823524030344489884E-01Q, /* bffccffffffffffffebecf10093df000 */
- 4.31904611473158635644635628922959401E-32Q, /* 3f96c083f0b1faa7c4c686193e38d67c */
- -2.22656250000000004835132405125162742E-01Q, /* bffcc8000000000002c98a233f19f000 */
- 2.54709791629335691650310168420597566E-33Q, /* 3f92a735903f5eed07a716ab931e20d9 */
- -2.18749999999999988969454021829236626E-01Q, /* bffcbffffffffffff9a42dc14ce36000 */
- -3.77236096429336082213752014054909454E-32Q, /* bf9687be8e5b2fca54d3e81157eac660 */
- -2.14843750000000010613256919115758495E-01Q, /* bffcb80000000000061e3d828ecac000 */
- -4.55194148712216691177097854305964738E-32Q, /* bf96d8b35c776aa3e1a4768271380503 */
- -2.10937499999999993204656148110447201E-01Q, /* bffcaffffffffffffc152f2aea118000 */
- -2.95044199165561453749332254271716417E-32Q, /* bf96326433b00b2439094d9bef22ddd1 */
- -2.07031250000000012233944895423355677E-01Q, /* bffca80000000000070d695ee0e94000 */
- 1.93146788688385419095981415411012357E-32Q, /* 3f959126729135a5e390d4bb802a0bde */
- -2.03125000000000008030983633336321863E-01Q, /* bffca0000000000004a129fbc51af000 */
- 2.37361904671826193563212931215900137E-32Q, /* 3f95ecfb3c4ba1b97ea3ad45cbb1e68a */
- -1.99218750000000001763815712796132779E-01Q, /* bffc98000000000001044b12d9950000 */
- -3.63171243370923753295192486732883239E-33Q, /* bf932db5fb3f27c38e0fa7bbcfc64f55 */
- -1.95312500000000004883660234506677272E-01Q, /* bffc90000000000002d0b3779d1f9000 */
- -3.19989507343607877747980892249711601E-33Q, /* bf9309d63de96bb3ef744c865f22f1bd */
- -1.91406250000000013720152363227519348E-01Q, /* bffc88000000000007e8bcb387121000 */
- -1.89295754093147174148371614722178860E-32Q, /* bf958926e2e67dfe812c508290add2e7 */
- -1.87500000000000000182342082774432620E-01Q, /* bffc800000000000001ae8b06a39f000 */
- -2.96812835183184815200854214892983927E-32Q, /* bf96343a62d156bbe71f55d14ca4b6e5 */
- -1.83593750000000012410147185883290345E-01Q, /* bffc78000000000007276a1adda8d000 */
- -2.02191931237489669058466239995304587E-32Q, /* bf95a3efab92d26ec2df90df036a117f */
- -1.79687499999999997439177363346082917E-01Q, /* bffc6ffffffffffffe8616db2927d000 */
- -9.92752326937775530007399526834009465E-33Q, /* bf949c5f88ed17041e1a3f1829d543cd */
- -1.75781249999999995824373974504785174E-01Q, /* bffc67fffffffffffd97c94f13ea3000 */
- 1.44184772065335613487885714828816178E-32Q, /* 3f952b75c63476e7fcc2f5841c27bcce */
- -1.71874999999999986685050259043077809E-01Q, /* bffc5ffffffffffff8530f6bc531a000 */
- -3.49007014971241147689894940544402482E-32Q, /* bf966a6dfaa012aea8ffe6d90b02330f */
- -1.67968749999999997316058782350439701E-01Q, /* bffc57fffffffffffe73eb914f2aa000 */
- 3.34025733574205019081305778794376391E-32Q, /* 3f965adf4572561fd5456a6c13d8babf */
- -1.64062499999999993322730602128318480E-01Q, /* bffc4ffffffffffffc269be4f68f3000 */
- -1.83345916769684984022099095506340635E-32Q, /* bf957ccb69026cb2f6024c211576d5f4 */
- -1.60156249999999992419000744447607979E-01Q, /* bffc47fffffffffffba13df21784a000 */
- 2.73442789798110494773517431626534726E-32Q, /* 3f961bf58ff22c9b30f1e2b39f26d7d5 */
- -1.56249999999999987665010524130393080E-01Q, /* bffc3ffffffffffff8e3ad45e7508000 */
- 2.02695576464836145806428118889332191E-32Q, /* 3f95a4fb7435a4a2f71de81eb8ae75d1 */
- -1.52343749999999989905291167951491803E-01Q, /* bffc37fffffffffffa2e48aecfc24000 */
- -3.61436631548815190395331054871041524E-32Q, /* bf967756567ebd108075ae527cc2e7f0 */
- -1.48437500000000006686107754967759751E-01Q, /* bffc30000000000003dab20261b3c000 */
- -2.15524270159131591469319477922198390E-32Q, /* bf95bfa05b82ef3a708c4f0395e9fcf6 */
- -1.44531250000000005132889939177166485E-01Q, /* bffc28000000000002f57b1969e7b000 */
- 2.74741116529653547935086189244019604E-32Q, /* 3f961d4eb77c1185d34fe1b04a3f3cf5 */
- -1.40625000000000000707469094533647325E-01Q, /* bffc2000000000000068676d3d5c4000 */
- 4.40607097220049957013547629906723266E-33Q, /* 3f936e0ac425daf795b42913cf0ef881 */
- -1.36718749999999995713752139187543306E-01Q, /* bffc17fffffffffffd87762255991000 */
- -3.73751317180116492404578048203389108E-32Q, /* bf9684202491e9cbb7ceb67d9ff7e0c9 */
- -1.32812500000000007198453630478482191E-01Q, /* bffc10000000000004264de3a4379000 */
- -3.97050085179660203884930593717220728E-32Q, /* bf969c52048de14be3c9c1971e50869c */
- -1.28906250000000006070486371645733082E-01Q, /* bffc080000000000037fd87db2cb0000 */
- 3.59610068058504988294019521946586131E-32Q, /* 3f967570c10687cb8e9ebd0b280abf5a */
- -1.25000000000000003700729208608337966E-01Q, /* bffc00000000000002222198bbc74000 */
- 3.23464851393124362331846965931995969E-33Q, /* 3f930cb95da3bfc847e593716c91d57a */
- -1.21093750000000013729038501177102555E-01Q, /* bffbf000000000000fd418d1f5fda000 */
- 2.45242487730722066611358741283977619E-32Q, /* 3f95fd5945ad86a464292e26ac192a84 */
- -1.17187499999999999765305306880205578E-01Q, /* bffbdfffffffffffffbabaf869845000 */
- -1.14557520298960389903199646350205537E-32Q, /* bf94dbda735322179d9bcf392e1dd06d */
- -1.13281250000000009579647893740755690E-01Q, /* bffbd000000000000b0b69bae7ab9000 */
- 2.37873962873837390105423621772752350E-32Q, /* 3f95ee0b7e0bd5ac1f6fab1e2a71abc3 */
- -1.09375000000000008981153004560108539E-01Q, /* bffbc000000000000a5ac4bc1d2c3000 */
- 1.53152444860014076105003555837231015E-32Q, /* 3f953e15ce931e12ef9a152522e32bdd */
- -1.05468749999999992399063850363228723E-01Q, /* bffbaffffffffffff73c998091408000 */
- -8.75920903597804862471749360196688834E-33Q, /* bf946bd7e310a01bae5687ebdc47fcc5 */
- -1.01562500000000007685885179918350550E-01Q, /* bffba0000000000008dc7910a648c000 */
- -4.63820993797174451904075397785059501E-33Q, /* bf938153d0e54001a472da180fb5e8aa */
- -9.76562499999999887262211517861331814E-02Q, /* bffb8ffffffffffff300915aa6fd6000 */
- -2.63767025974952608658936466715705903E-33Q, /* bf92b64215bb8d520be5404620d38088 */
- -9.37499999999999939650246024457439795E-02Q, /* bffb7ffffffffffff90aca26bd0fc000 */
- -1.72047822349322956713582039121348377E-32Q, /* bf9565545015c5b9b56d02cfefca2c7d */
- -8.98437500000000033088896383977486369E-02Q, /* bffb70000000000003d09ca1e3cbe000 */
- 3.04831994420989436248526129869697270E-33Q, /* 3f92fa7d30d2ed90e7ebbd6231fd08b1 */
- -8.59374999999999947312400115121319225E-02Q, /* bffb5ffffffffffff9ecefc03376e000 */
- 1.50416954438393392150792422537312281E-32Q, /* 3f9538675ee99bd722fad0023c09c915 */
- -8.20312500000000054182280847004695514E-02Q, /* bffb500000000000063f2dbd40200000 */
- 2.68399664523430004488075638997207289E-33Q, /* 3f92bdf49766629882c49a3da88928ed */
- -7.81250000000000114767533968079748798E-02Q, /* bffb4000000000000d3b56f81ba70000 */
- 1.72318124201659121296305402819694281E-32Q, /* 3f9565e407aaabfb359e8a567d760de3 */
- -7.42187500000000035531829472486812869E-02Q, /* bffb3000000000000418b6e9b5388000 */
- 2.09401756478514117051383998628099655E-32Q, /* 3f95b2e91221fcd74be0a86d8ad658d2 */
- -7.03124999999999987474933134860732535E-02Q, /* bffb1ffffffffffffe8e53453d2ac000 */
- 2.28515798224350800271565551341211666E-32Q, /* 3f95da9bd6adf00894f05b5cc5530125 */
- -6.64062500000000042267533361089054159E-02Q, /* bffb10000000000004df8473dbcf2000 */
- 1.97576478800281368377376002585430031E-32Q, /* 3f959a59acbddb2f53bd3096b66370e9 */
- -6.25000000000000066329769382774201686E-02Q, /* bffb00000000000007a5b5914e336000 */
- -1.46422615813786836245343723048221678E-33Q, /* bf91e69295f069fc0c4a9db181ea25a3 */
- -5.85937500000000002823707957982406053E-02Q, /* bffae0000000000000a6aeab10592000 */
- 9.25637741701318872896718218457555829E-33Q, /* 3f94807eb021f1f40a37d4015b1eb76b */
- -5.46875000000000081586888005226044448E-02Q, /* bffac0000000000012d00a3171e3a000 */
- -4.87144542459404765480424673678105050E-33Q, /* bf9394b42faba6b7036fe7b36269daf3 */
- -5.07812499999999927720348253140567013E-02Q, /* bffa9fffffffffffef555cc8dd914000 */
- -3.01901021987395945826043649523451725E-33Q, /* bf92f59e7e3025691f290f8f67277faf */
- -4.68749999999999935349476738962633103E-02Q, /* bffa7ffffffffffff117b4ea2b876000 */
- 1.21521638219189777347767475937119750E-32Q, /* 3f94f8c7f88c5b56674b94d984ac8ecb */
- -4.29687500000000056305562847814228219E-02Q, /* bffa6000000000000cfbb19be30c0000 */
- -1.18643699217679276275559592978275214E-32Q, /* bf94ecd39f0833a876550e83eb012b99 */
- -3.90624999999999962692914526031373542E-02Q, /* bffa3ffffffffffff765c743922f9000 */
- -4.91277156857520035712509544689973679E-33Q, /* bf939823189996193872e58ac0dececb */
- -3.51562500000000108152468207687602886E-02Q, /* bffa20000000000018f031e41177f000 */
- 1.18599806302656253755207072755609820E-32Q, /* 3f94eca4f23e787fab73ce8f6b9b8d64 */
- -3.12500000000000077376981036742289578E-02Q, /* bffa00000000000011d787e0b386f000 */
- 9.97730386477005171963635210799577079E-33Q, /* 3f949e70e498c46a0173ac0d46c699fc */
- -2.73437500000000139436129596418623235E-02Q, /* bff9c00000000000404db66e70a08000 */
- 2.25755321633070123579875157841633859E-33Q, /* 3f927719b1a93074bdf9f3c2cb784785 */
- -2.34375000000000088003629211828324876E-02Q, /* bff98000000000002895a27d45feb000 */
- 2.84374279216848803102126617873942975E-33Q, /* 3f92d87f70e749d6da6c260b68dc210b */
- -1.95312500000000107408831063404855424E-02Q, /* bff9400000000000318898ba69f71000 */
- 2.47348089686935458989103979140011912E-33Q, /* 3f929afa3de45086fe909fdddb41edce */
- -1.56250000000000081443917555362290635E-02Q, /* bff9000000000000258f335e9cdd6000 */
- -2.43379314483517422161458863218426254E-33Q, /* bf9294621c8a9ccacf2b020ec19cad27 */
- -1.17187500000000051490597418161403184E-02Q, /* bff88000000000002f7ddfa26221f000 */
- 1.83405297208145390679150568810924707E-33Q, /* 3f9230bbfc5d5fe1b534fbcda0465bb9 */
- -7.81249999999999715861805208310174953E-03Q, /* bff7ffffffffffffcb95f3fff157d000 */
- 3.51548384878710915171654413641872451E-34Q, /* 3f8fd349b76c22966f77a39fc37ed704 */
- -3.90625000000000309326013918295097128E-03Q, /* bff7000000000000390f820c8e153000 */
- 6.38058004651791109324060099097251911E-36Q, /* 3f8a0f665d3ac25a1ac94d688273dbcd */
-#define T_EXPL_ARG1 (2*89)
- 0.00000000000000000000000000000000000E+00Q, /* 00000000000000000000000000000000 */
- 0.00000000000000000000000000000000000E+00Q, /* 00000000000000000000000000000000 */
- 3.90625000000000245479958859972588985E-03Q, /* 3ff70000000000002d48769ac9874000 */
- -6.58439598384342854976169982902779828E-36Q, /* bf8a1811b923e6c626b07ef29761482a */
- 7.81250000000001311374391093664996358E-03Q, /* 3ff800000000000078f3f3cd89111000 */
- 2.60265650555493781464273319671555602E-33Q, /* 3f92b070c3b635b87af426735a71fc87 */
- 1.17187500000000269581156218247101912E-02Q, /* 3ff8800000000000f8a50d02fe20d000 */
- 1.00961747974945520631836275894919326E-33Q, /* 3f914f80c1a4f8042044fe3b757b030b */
- 1.56249999999999797878275270751825475E-02Q, /* 3ff8ffffffffffff45935b69da62e000 */
- 2.03174577741375590087897353146748580E-33Q, /* 3f925194e863496e0f6e91cbf6b22e26 */
- 1.95312499999999760319884511789111533E-02Q, /* 3ff93fffffffffff917790ff9a8f4000 */
- 4.62788519658803722282100289809515007E-33Q, /* 3f9380783ba81295feeb3e4879d7d52d */
- 2.34374999999999822953909016349145918E-02Q, /* 3ff97fffffffffffae5a163bd3cd5000 */
- -3.19499956304699705390404384504876533E-33Q, /* bf93096e2037ced8194cf344c692f8d6 */
- 2.73437500000000137220327275871555682E-02Q, /* 3ff9c000000000003f481dea5dd51000 */
- -2.25757776523031994464630107442723424E-33Q, /* bf92771abcf988a02b414bf2614e3734 */
- 3.12499999999999790857640618332718621E-02Q, /* 3ff9ffffffffffff9f8cd40b51509000 */
- -4.22479470489989916319395454536511458E-33Q, /* bf935efb7245612f371deca17cb7b30c */
- 3.51562499999999840753382405747597346E-02Q, /* 3ffa1fffffffffffdb47bd275f722000 */
- 1.08459658374118041980976756063083500E-34Q, /* 3f8e2055d18b7117c9db1c318b1e889b */
- 3.90624999999999989384433621470426757E-02Q, /* 3ffa3ffffffffffffd8d5e18b042e000 */
- -7.41674226146122000759491297811091830E-33Q, /* bf94341454e48029e5b0205d91baffdc */
- 4.29687500000000107505739500500200462E-02Q, /* 3ffa60000000000018ca04cd9085c000 */
- -4.74689012756713017494437969420919847E-34Q, /* bf903b7c268103c6f7fbaaa24142e287 */
- 4.68749999999999978700749928325717352E-02Q, /* 3ffa7ffffffffffffb16b6d5479e3000 */
- -1.06208165308448830117773486334902917E-32Q, /* bf94b92be4b3b5b5a596a0a5187cc955 */
- 5.07812499999999815072625435955786253E-02Q, /* 3ffa9fffffffffffd55bd086d5cbc000 */
- -9.37038897148383660401929567549111394E-33Q, /* bf94853b111b0175b491c80d00419416 */
- 5.46874999999999809511553152189867394E-02Q, /* 3ffabfffffffffffd4138bfa74a61000 */
- 1.06642963074562437340498606682822123E-32Q, /* 3f94bafa3fe991b39255d563dfa05d89 */
- 5.85937500000000184331996330905145551E-02Q, /* 3ffae000000000002a810a5f2f8bf000 */
- -1.76639977694797200820296641773791945E-34Q, /* bf8ed596f07ce4408f1705c8ec16864c */
- 6.25000000000000021544696744852045001E-02Q, /* 3ffb000000000000027be32045e2b000 */
- 1.68616371995798354366633034788947149E-32Q, /* 3f955e33d7440794d8a1b25233d086ab */
- 6.64062499999999965563110718495802889E-02Q, /* 3ffb0ffffffffffffc079a38a3fed000 */
- -1.82463217667830160048872113565316215E-32Q, /* bf957af6163bcdb97cefab44a942482a */
- 7.03124999999999759989183341261898222E-02Q, /* 3ffb1fffffffffffe454218acea05000 */
- -1.07843770101525495515646940862541503E-32Q, /* bf94bff72aada26d94e76e71c07e0580 */
- 7.42187499999999898968873730710101412E-02Q, /* 3ffb2ffffffffffff45a166496dc1000 */
- 1.28629441689592874462780757154138223E-32Q, /* 3f950b2724597b8b93ce1e9d1cf4d035 */
- 7.81249999999999957198938523510804668E-02Q, /* 3ffb3ffffffffffffb10bc52adbc5000 */
- 1.13297573459968118467100063135856856E-33Q, /* 3f91787eea895b3c245899cf34ad0abd */
- 8.20312500000000199911640621145851159E-02Q, /* 3ffb500000000000170c59a661a89000 */
- -1.51161335208135146756554123073528707E-32Q, /* bf9539f326c5ca84e7db5401566f3775 */
- 8.59375000000000134175373433347670743E-02Q, /* 3ffb6000000000000f78287547af0000 */
- 1.09763629458404270323909815379924900E-32Q, /* 3f94c7f0b61b6e3e27d44b9f5bbc7e9d */
- 8.98437500000000036533922600308306335E-02Q, /* 3ffb70000000000004364a83b7a14000 */
- 3.11459653680110433194288029777718358E-33Q, /* 3f9302c0248136d65cebeab69488d949 */
- 9.37500000000000184977946245216914691E-02Q, /* 3ffb800000000000155395d870b17000 */
- -4.66656154468277949130395786965043927E-33Q, /* bf9383aec9b993b6db492b1ede786d8a */
- 9.76562500000000237839723100419376084E-02Q, /* 3ffb9000000000001b6bca237f6c4000 */
- -1.03028043424658760249140747856831301E-32Q, /* bf94abf6352e3d2bb398e47919a343fb */
- 1.01562500000000012345545575236836572E-01Q, /* 3ffba000000000000e3bc30cd9a1f000 */
- 2.15755372310795701322789783729456319E-32Q, /* 3f95c01b3b819edd9d07548fafd61550 */
- 1.05468749999999976493840484471911438E-01Q, /* 3ffbafffffffffffe4e634cd77985000 */
- 1.78771847038773333029677216592309083E-32Q, /* 3f95734b6ae650f33dd43c49a1df9fc0 */
- 1.09375000000000002267015055992785402E-01Q, /* 3ffbc00000000000029d1ad08de7b000 */
- 6.23263106693943817730045115112427717E-33Q, /* 3f9402e4b39ce2198a45e1d045868cd6 */
- 1.13281250000000022354208618429577398E-01Q, /* 3ffbd0000000000019c5cc3f9d2b5000 */
- 5.40514416644786448581426756221178868E-33Q, /* 3f93c10ab4021472c662f69435de9269 */
- 1.17187500000000013252367133076817603E-01Q, /* 3ffbe000000000000f47688cc561b000 */
- -7.12412585457324989451327215568641325E-33Q, /* bf9427ecb343a8d1758990565fcfbf45 */
- 1.21093750000000020759863992944300792E-01Q, /* 3ffbf0000000000017ef3af97bf04000 */
- 6.26591408357572503875647872077266444E-33Q, /* 3f940446a09a2da771b45fc075514d12 */
- 1.25000000000000004739659392396765618E-01Q, /* 3ffc00000000000002bb7344ecd89000 */
- -1.55611398459729463981000080101758830E-32Q, /* bf95433135febefa9e6aa4db39e263d2 */
- 1.28906249999999982360888081057894783E-01Q, /* 3ffc07fffffffffff5d4ed3154361000 */
- -1.77531518652835570781208599686606474E-32Q, /* bf9570b7f225ea076f97f418d11359c1 */
- 1.32812500000000010568583998727400436E-01Q, /* 3ffc1000000000000617a5d09526a000 */
- 2.12104021624990594668286391598300893E-32Q, /* 3f95b885d767a1048d93055927a27adc */
- 1.36718749999999998434125157367005292E-01Q, /* 3ffc17ffffffffffff18eaebc7970000 */
- 2.50454798592543203967309921276955297E-32Q, /* 3f9604164e5598528a76faff26cd1c97 */
- 1.40625000000000015550032422969330356E-01Q, /* 3ffc20000000000008f6c79d8928c000 */
- 7.80972982879849783680252962992639832E-33Q, /* 3f9444674acf2b3225c7647e0d95edf3 */
- 1.44531250000000012402535562111122522E-01Q, /* 3ffc28000000000007264a8bc1ff1000 */
- 2.79662468716455159585514763921671876E-32Q, /* 3f96226b095bd78aa650faf95a221993 */
- 1.48437500000000007761020440087419948E-01Q, /* 3ffc3000000000000479530ff8fe3000 */
- 2.15518492972728435680556239996258527E-32Q, /* 3f95bf9d49295e73a957906a029768cb */
- 1.52343750000000001733189947520484032E-01Q, /* 3ffc38000000000000ffc6109f71f000 */
- 8.34032236093545825619420380704500188E-33Q, /* 3f945a71851226a1d0ce5e656693153e */
- 1.56249999999999988073295321246958484E-01Q, /* 3ffc3ffffffffffff91fedd62ae0f000 */
- 2.44119337150624789345260194989620908E-32Q, /* 3f95fb041a57bc1c1280680ac1620bea */
- 1.60156250000000002076894210913572460E-01Q, /* 3ffc48000000000001327ed84a199000 */
- -7.36124501128859978061216696286151753E-33Q, /* bf9431c62f01e59d2c1e00f195a0037f */
- 1.64062500000000000950861276373482172E-01Q, /* 3ffc500000000000008c5285fba85000 */
- -4.80566184447001164583855800470217373E-33Q, /* bf938f3d1fcafd390f22f80e6c19421f */
- 1.67968749999999989878071706155265999E-01Q, /* 3ffc57fffffffffffa2a445c548c5000 */
- -4.42154428718618459799673088733365064E-32Q, /* bf96cb28cf1c1b28006d53ffe633b22a */
- 1.71874999999999999459734108403218175E-01Q, /* 3ffc5fffffffffffffb04554e9dd4000 */
- -3.29736288190321377985697972236270628E-32Q, /* bf96566af0ebc852e84be12859b24a31 */
- 1.75781249999999997987525759778901845E-01Q, /* 3ffc67fffffffffffed702df6ffff000 */
- -1.28800728638468399687523924685844352E-32Q, /* bf950b8236b88ca0c1b739dc91a7e3fc */
- 1.79687500000000004929565820437175783E-01Q, /* 3ffc70000000000002d779bb32d2e000 */
- 1.60624461317978482424582320675174225E-32Q, /* 3f954d9a9cc0c963fd081f3dc922d04e */
- 1.83593750000000016873727045739708856E-01Q, /* 3ffc78000000000009ba1f6263c9a000 */
- -3.83390389582056606880506003118452558E-32Q, /* bf968e22a5d826f77f19ee788474df22 */
- 1.87500000000000013443068740761666872E-01Q, /* 3ffc80000000000007bfd8c72a1bf000 */
- -2.74141662712926256150154726565203091E-32Q, /* bf961caf5ac59c7f941f928e324c2cc1 */
- 1.91406249999999981494101786848611970E-01Q, /* 3ffc87fffffffffff55502eeae001000 */
- 3.68992437075565165346469517256118001E-32Q, /* 3f967f2f03f9096793372a27b92ad79d */
- 1.95312499999999989069921848800501648E-01Q, /* 3ffc8ffffffffffff9b3015280394000 */
- 3.69712249337856518452988332367785220E-32Q, /* 3f967fee5fdb5bd501ff93516999faa0 */
- 1.99218750000000021148042946919300804E-01Q, /* 3ffc9800000000000c30e67939095000 */
- 2.50142536781142175091322844848566649E-32Q, /* 3f9603c34ae58e10b300b07137ee618a */
- 2.03124999999999977732559198825437141E-01Q, /* 3ffc9ffffffffffff329e7df079e4000 */
- -2.41951877287895024779300892731537816E-32Q, /* bf95f683aefe6965f080df8f59dd34a1 */
- 2.07031249999999996744030653771913124E-01Q, /* 3ffca7fffffffffffe1f80f4b73ca000 */
- -1.94346475904454000031592792989765585E-32Q, /* bf9593a44f87870a3d100d498501ecc7 */
- 2.10937500000000000251399259834392298E-01Q, /* 3ffcb000000000000025199873310000 */
- -1.33528748788094249098998693871759411E-33Q, /* bf91bbb9b25c813668d6103d08acac35 */
- 2.14843749999999993936323609611875097E-01Q, /* 3ffcb7fffffffffffc8128c866236000 */
- 1.14839877977014974625242788556545292E-32Q, /* 3f94dd06b4655c9b83a1305b240e7a42 */
- 2.18750000000000015181732784749663837E-01Q, /* 3ffcc0000000000008c06da5fff24000 */
- 1.42689085313142539755499441881408391E-32Q, /* 3f95285a87dfa7ea7dad5b3be8c669f4 */
- 2.22656249999999992172647770539596569E-01Q, /* 3ffcc7fffffffffffb7ce2fe531f6000 */
- -3.34421462850496887359128610229650547E-32Q, /* bf965b487962b5c2d9056ca6ac0c2e5c */
- 2.26562499999999989595607223847082419E-01Q, /* 3ffccffffffffffffa0095277be5c000 */
- -3.08983588107248752517344356508205569E-32Q, /* bf9640dded57157f8eded311213bdbcd */
- 2.30468749999999979130462438434567117E-01Q, /* 3ffcd7fffffffffff3f8332996560000 */
- -3.01407539802851697849105682795217019E-32Q, /* bf9638ffde35dbdfe1a1ffe45185de5d */
- 2.34375000000000012194252337217891971E-01Q, /* 3ffce0000000000007078dd402c86000 */
- -8.46879710915628592284714319904522657E-33Q, /* bf945fc7b29a2ac6c9eff9eb258a510f */
- 2.38281249999999982991877076137149870E-01Q, /* 3ffce7fffffffffff6320b486eece000 */
- -2.93563878880439245627127095245798544E-32Q, /* bf9630daaa4f40ff05caf29ace2ea7d4 */
- 2.42187499999999981447559841442773990E-01Q, /* 3ffceffffffffffff54e24a09a8d5000 */
- -4.56766746558806021264215486909850481E-32Q, /* bf96da556dee11f3113e5a3467b908e6 */
- 2.46093749999999991067720539980207318E-01Q, /* 3ffcf7fffffffffffad9d405dcb5d000 */
- 2.14033004219908074003010247652128251E-32Q, /* 3f95bc8776e8f9ae098884aa664cc3df */
- 2.50000000000000016613825838126835953E-01Q, /* 3ffd00000000000004c9e24c12bb3000 */
- 2.57617532593749185996714235009382870E-32Q, /* 3f960b867cc01178c0ec68226c6cb47d */
- 2.53906250000000013372004437827044321E-01Q, /* 3ffd04000000000003daae05b3168000 */
- 7.20177123439204414298152646284640101E-32Q, /* 3f9775eff59ddad7e7530b83934af87f */
- 2.57812499999999995765234725413886085E-01Q, /* 3ffd07fffffffffffec7878bad9d5000 */
- 6.51253187532920882777046064603770602E-32Q, /* 3f975226659ca241402e71c2011583b0 */
- 2.61718750000000007647689994011222248E-01Q, /* 3ffd0c000000000002344cc793a0f000 */
- 3.02370610028725823590045201871491395E-32Q, /* 3f9639ffe55fa2fa011674448b4e5b96 */
- 2.65624999999999986893899042596554269E-01Q, /* 3ffd0ffffffffffffc38f0c0a1e9f000 */
- -2.07683715950724761146070082510569258E-32Q, /* bf95af579a92e872fef81abfdf06bae8 */
- 2.69531249999999979842788204900639327E-01Q, /* 3ffd13fffffffffffa30a908d67db000 */
- 8.71465252506557329027658736641075706E-32Q, /* 3f97c47d99e19830447a42b1c0ffac61 */
- 2.73437500000000006712165837793818271E-01Q, /* 3ffd18000000000001ef453a58edb000 */
- -6.62704045767568912140550474455810301E-32Q, /* bf9758187a204dcb06ece46588aeeaba */
- 2.77343749999999994411329302988535617E-01Q, /* 3ffd1bfffffffffffe63a0fec9c9e000 */
- -4.87273466291944117406493607771338767E-32Q, /* bf96fa0381b0844a0be46bac2d673f0c */
- 2.81250000000000012677892447379453135E-01Q, /* 3ffd20000000000003a7769e125d6000 */
- -8.55871796664700790726282049552906783E-32Q, /* bf97bc64e01332cf7616b0091b8dff2c */
- 2.85156249999999998558643013736363981E-01Q, /* 3ffd23ffffffffffff95a5894bccf000 */
- -1.33068334720606220176455289635046875E-32Q, /* bf95145f43290ecf5b7adcb24697bc73 */
- 2.89062500000000008831431235621753924E-01Q, /* 3ffd280000000000028ba504fac59000 */
- -9.34157398616814623985483776710704237E-32Q, /* bf97e50ad1115b941fcb5f0c88a428f7 */
- 2.92968750000000019840235286110877063E-01Q, /* 3ffd2c000000000005b7f372d184f000 */
- 4.99302093775173155906059132992249671E-33Q, /* 3f939ecdcfb97bad3f8dbec5df5ec67d */
- 2.96875000000000015867911730971630513E-01Q, /* 3ffd3000000000000492d860c79db000 */
- 7.86107787827057767235127454590866211E-33Q, /* 3f944689517ee8f16cdb97d6a6938f32 */
- 3.00781250000000015814100002286124758E-01Q, /* 3ffd340000000000048edfe73a17d000 */
- -1.65419431293024229981937172317171504E-32Q, /* bf9557900e3efca16c89646b57f68dc0 */
- 3.04687499999999985213157159965287195E-01Q, /* 3ffd37fffffffffffbbcec6f99b36000 */
- 9.68753602893894024018934325652944198E-32Q, /* 3f97f70170e5458660c33a7e8d43d049 */
- 3.08593749999999989969324338045156215E-01Q, /* 3ffd3bfffffffffffd1bdde4d0fb1000 */
- 7.10268609610294706092252562643261106E-32Q, /* 3f9770cae45cdf615010401a4b37d8d4 */
- 3.12500000000000002971606591018488854E-01Q, /* 3ffd40000000000000db440fbc06b000 */
- 6.38924218802905979887732294952782964E-32Q, /* 3f974bbf988bb5622bd8fbaa46e8b811 */
- 3.16406250000000006594921047402056305E-01Q, /* 3ffd44000000000001e69e8954814000 */
- 3.96079878754651470094149874444850097E-32Q, /* 3f969b5017b9fa7a1e86975258c73d3d */
- 3.20312500000000006713799366908329147E-01Q, /* 3ffd48000000000001ef64159c065000 */
- -1.86401314975634286055150437995880517E-32Q, /* bf958323f0434911794e5fb8bfe136ba */
- 3.24218749999999987061246567584951210E-01Q, /* 3ffd4bfffffffffffc4549db9b928000 */
- -3.18643523744758601387071062700407431E-32Q, /* bf964ae5fa7e26c2c3981bed12e14372 */
- 3.28124999999999991782776266707412953E-01Q, /* 3ffd4ffffffffffffda1ad0840ca8000 */
- -4.46964199751314296839915534813144652E-32Q, /* bf96d0277729ffd74727150df6d15547 */
- 3.32031250000000000393816557756032682E-01Q, /* 3ffd540000000000001d0efc04fad000 */
- -9.03246333902065439930373230002688649E-33Q, /* bf947731a008748cc6dee948839ef7ae */
- 3.35937499999999983810482995064392173E-01Q, /* 3ffd57fffffffffffb556cab8ae61000 */
- 5.27742727066129518825981597650621794E-32Q, /* 3f9712050a6ddbf1cabf1b971f4b5d0b */
- 3.39843750000000004310441349760912471E-01Q, /* 3ffd5c0000000000013e0def5ddc4000 */
- -3.85927263474732591932884416445586106E-32Q, /* bf9690c51088ef3db9ca000829c450c2 */
- 3.43749999999999990248130003997484364E-01Q, /* 3ffd5ffffffffffffd3070624a0af000 */
- 9.62005170171527308106468341512327487E-34Q, /* 3f913fae595cea84432eb01430817fca */
- 3.47656250000000004085726414568625697E-01Q, /* 3ffd640000000000012d79309e291000 */
- -6.59664093705705297250259434519072507E-32Q, /* bf97568465eafb0e662e64a5dbfaf35f */
-
- -1.98364257812501251077851763965418372E-03Q, /* bff6040000000001cd90f658cf0b1000 */
- -3.71984513103117734260309047540278737E-34Q, /* bf8fee73c54483194782aac4a6154d11 */
- -1.95312500000000378520649630233891879E-03Q, /* bff60000000000008ba643bb5e2e8000 */
- -1.12194202736719050440745599339855038E-34Q, /* bf8e2a436aeff7bc529873354f47a3f5 */
- -1.92260742187499397430259771221991482E-03Q, /* bff5f7fffffffffe4361cb51170da000 */
- -2.30068299876822157331268484824540848E-34Q, /* bf8f31d02f85cfe8c0cc02276ce0f437 */
- -1.89208984375001137424603270262074989E-03Q, /* bff5f0000000000347456ed490c23000 */
- -1.15012507244426243338260435466985403E-34Q, /* bf8e31c174d5677a937a34ad8d2a70b4 */
- -1.86157226562500172319250342061336738E-03Q, /* bff5e800000000007f262fa3617b4000 */
- -3.12438344643346437509767736937785561E-34Q, /* bf8f9f4d426a2457c273d34ef7d9bde9 */
- -1.83105468749999505256246872355430379E-03Q, /* bff5dffffffffffe92f18c1c2b6fa000 */
- -5.91130415288336591179087455220308942E-35Q, /* bf8d3a4c80b42dc036bae446c9807f78 */
- -1.80053710937499445182387245573120522E-03Q, /* bff5d7fffffffffe669dea82b4a4c000 */
- -1.92396289352411531324908916321392100E-34Q, /* bf8eff7a2123fb573ba9778550d669bd */
- -1.77001953125000387737631542516323906E-03Q, /* bff5d000000000011e19915c3ddb7000 */
- 7.91101758977203355387806553469731354E-36Q, /* 3f8a507f5a70faaccf469e3461873dea */
- -1.73950195312500034854670281415554486E-03Q, /* bff5c8000000000019b7dc6ef97bd000 */
- 1.55906551582436824067407021178835755E-34Q, /* 3f8e9e7880333e34955aebcde3cfb053 */
- -1.70898437499998955782591472611429852E-03Q, /* bff5bffffffffffcfd80e88aa6b96000 */
- 8.22951661962611381718215899498500357E-35Q, /* 3f8db58e6031a779b59f6ece191de7cc */
- -1.67846679687500586652037711131708544E-03Q, /* bff5b80000000001b0df6fd21c133000 */
- -8.96642618848426299713145894522897419E-35Q, /* bf8ddcbcab46d531801bfae4121f2f8a */
- -1.64794921875000109499161354039904782E-03Q, /* bff5b0000000000050cbce8915575000 */
- -2.88077905394253859590587789680486639E-34Q, /* bf8f7eebd4dd860ef73b674d5e707959 */
- -1.61743164062501133830507079150388351E-03Q, /* bff5a80000000003449e8700c3e82000 */
- -3.68271725851639066312899986829350273E-34Q, /* bf8fe9845fe20a5fe74059e0cae185d6 */
- -1.58691406249999015546015764131101956E-03Q, /* bff59ffffffffffd2999e668cdd28000 */
- 8.48197657099957029953716507898788812E-35Q, /* 3f8dc2faaebb97392e451b07b28c4b12 */
- -1.55639648437500317366570219290722587E-03Q, /* bff5980000000000ea2cd9a40d256000 */
- -3.45156704719737676412949957712570373E-36Q, /* bf8925a079505516c8e317ac1ff53255 */
- -1.52587890625000568759013197767046039E-03Q, /* bff5900000000001a3ab8a3f6b698000 */
- -1.01902948542497496574967177677556729E-34Q, /* bf8e0ee78d94d9b5ad3d63ae35c9b554 */
- -1.49536132812500945889014955936485340E-03Q, /* bff5880000000002b9f1621b57743000 */
- -3.32264697086631598830366079048117140E-34Q, /* bf8fb9a7d14c32289204fbb0c9eb20e0 */
- -1.46484374999999931883259902869504725E-03Q, /* bff57fffffffffffcdbd1c90e1b4a000 */
- -1.76487524793892929381101031660811433E-34Q, /* bf8ed52f2f724bc1ae870b18356337b4 */
- -1.43432617187498876325946983333888768E-03Q, /* bff577fffffffffcc2dff8faa5570000 */
- -3.54550084538495708816233114576143814E-34Q, /* bf8fd74724576915868c1e8ce9f430f1 */
- -1.40380859374999215367421282192718062E-03Q, /* bff56ffffffffffdbd0b18aac65ed000 */
- -1.90585907028351204486765167064669639E-34Q, /* bf8efaaa0c0e23e50c11b2120348054f */
- -1.37329101562499692341771212945644892E-03Q, /* bff567ffffffffff1cfd00f1b0577000 */
- -3.59631150411372589637918252836880320E-34Q, /* bf8fde08239ac74942a46298ea4fb715 */
- -1.34277343749999137467356674296739172E-03Q, /* bff55ffffffffffd839030b05d53d000 */
- -1.49571076125940368185068762485268117E-35Q, /* bf8b3e1a3d5c684b27a9f835b1d8d3c9 */
- -1.31225585937499247038404301859788734E-03Q, /* bff557fffffffffdd469936e691e3000 */
- 3.10375845385355395586146533282311300E-34Q, /* 3f8f9c8f6d63b7a4145716ffd92491fb */
- -1.28173828124999024755581675764821898E-03Q, /* bff54ffffffffffd306589b0ab21d000 */
- -1.98541096105909793397376077900810019E-34Q, /* bf8f07e808bbb1e35106c294ffbb9687 */
- -1.25122070312500340204619591143332523E-03Q, /* bff5480000000000fb06d5f16ad2c000 */
- 3.62884195935761446237911443317457521E-34Q, /* 3f8fe25b17d623178a386a6fa6c5afb2 */
- -1.22070312499999591578388993012071279E-03Q, /* bff53ffffffffffed2a356c440074000 */
- -2.96756662615653130862526710937493307E-35Q, /* bf8c3b90d8ff2a991e5bd16718fb0645 */
- -1.19018554687498821966212632349422735E-03Q, /* bff537fffffffffc9ac3b585dda89000 */
- 1.44659971891167323357060028901142644E-34Q, /* 3f8e809279ab249edf1dad9fe13fb0bf */
- -1.15966796875000160938908064907298384E-03Q, /* bff530000000000076c0800db9639000 */
- 2.50088010538742402346270685365928513E-34Q, /* 3f8f4c6c8a483b60201d30c1a83c3cb7 */
- -1.12915039062500267151512523291939657E-03Q, /* bff5280000000000c51f7e7315137000 */
- 7.56402096465615210500092443924888831E-35Q, /* 3f8d922c1e485d99aea2668ed32b55a6 */
- -1.09863281249998665006360103291051571E-03Q, /* bff51ffffffffffc26f2d4c9ce2ba000 */
- 1.43982174467233642713619821353592061E-34Q, /* 3f8e7ec530b3d92b6303bec1c81214d1 */
- -1.06811523437500522742248711752028025E-03Q, /* bff518000000000181b7380f10446000 */
- 5.41265133745862349181293024531133174E-35Q, /* 3f8d1fc9313d018b30e790e06b6be723 */
- -1.03759765624999980942114138999770552E-03Q, /* bff50ffffffffffff1f01130490e1000 */
- 1.21525139612685854366189534669623436E-34Q, /* 3f8e4311b96b6fcde412caf3f0d86fb9 */
- -1.00708007812499602697537601515759439E-03Q, /* bff507fffffffffedad7afcce7051000 */
- 1.00020246351201558505328236381833392E-34Q, /* 3f8e09e640992512b1300744a7e984ed */
- -9.76562499999992592487302113340463694E-04Q, /* bff4fffffffffffbbad8151f8adf6000 */
- -1.64984406575162932060422892046851002E-34Q, /* bf8eb69a919986e8054b86fc34300f24 */
- -9.46044921874989085824996924138179594E-04Q, /* bff4effffffffff9b55a204fd9792000 */
- -9.29539174108308550334255350011347171E-35Q, /* bf8dee3a50ed896b4656fa577a1df3d7 */
- -9.15527343750013735214860599791540029E-04Q, /* bff4e00000000007eaf5bf103f82d000 */
- 3.07557018309280519949818825519490586E-35Q, /* 3f8c470cfbef77d32c74cb8042f6ee81 */
- -8.85009765625012292294986105781516428E-04Q, /* bff4d000000000071605c65403b97000 */
- 4.77499983783821950338363358545463558E-35Q, /* 3f8cfbc3dc18884c4c4f9e07d90d7bd3 */
- -8.54492187499986941239470706817188192E-04Q, /* bff4bffffffffff878ddf9cab264a000 */
- -1.60128240346239526958630011447901568E-34Q, /* bf8ea9b1a21e19e2d5bd84b0fbffcf95 */
- -8.23974609374996290174598690241743810E-04Q, /* bff4affffffffffddc86c249ebe06000 */
- 1.61677540391961912631535763471935882E-34Q, /* 3f8eadd00841366b0dc2bc262c2c8c36 */
- -7.93457031249988696952538334288757473E-04Q, /* bff49ffffffffff97bf6f0aa85a5f000 */
- 1.22318577008381887076634753347515709E-34Q, /* 3f8e452db5b5d250878f71040da06d14 */
- -7.62939453124996723316499040007097041E-04Q, /* bff48ffffffffffe1c7265b431108000 */
- -1.03845161748762410745671891558398468E-34Q, /* bf8e14115ad884c96d1a820c73647220 */
- -7.32421874999998242520117923997325794E-04Q, /* bff47ffffffffffefca4498b7aa8a000 */
- 5.64005211953031009549514026639438083E-35Q, /* 3f8d2be06950f68f1a6d8ff829a6928e */
- -7.01904296874999772890934814265622012E-04Q, /* bff46fffffffffffde7c0fe5d8041000 */
- 5.90245467325173644235991233229525762E-35Q, /* 3f8d39d40cc49002189243c194b1db0e */
- -6.71386718750008699269643939210658742E-04Q, /* bff460000000000503c91d798b60c000 */
- -5.20515801723324452151498579012322191E-35Q, /* bf8d14c0f08a6a9285b32b8bda003eb5 */
- -6.40869140625005499535275057463709988E-04Q, /* bff45000000000032b969184e9751000 */
- -6.69469163285461870099846471658294534E-35Q, /* bf8d63f36bab7b24d936c9380e3d3fa6 */
- -6.10351562499999293780097329596079841E-04Q, /* bff43fffffffffff97c7c433e35ed000 */
- -1.16941808547394177991845382085515086E-34Q, /* bf8e36e27886f10b234a7dd8fc588bf0 */
- -5.79833984375000068291972326409994795E-04Q, /* bff43000000000000a13ff6dcf2bf000 */
- 1.17885044988246219185041488459766001E-34Q, /* 3f8e3964677e001a00412aab52790842 */
- -5.49316406249990904622170867910987793E-04Q, /* bff41ffffffffffac1c25739c716b000 */
- -3.31875702128137033065075734368960972E-35Q, /* bf8c60e928d8982c3c99aef4f885a121 */
- -5.18798828125011293653756992177727236E-04Q, /* bff410000000000682a62cff36775000 */
- -5.69971237642088463334239430962628187E-35Q, /* bf8d2f0c76f8757d61cd1abc7ea7d066 */
- -4.88281249999990512232251384917893121E-04Q, /* bff3fffffffffff50fb48992320df000 */
- 1.02144616714408655325510171265051108E-35Q, /* 3f8ab279a3626612710b9b3ac71734ac */
- -4.57763671874997554564967307956493434E-04Q, /* bff3dffffffffffd2e3c272e3cca9000 */
- -8.25484058867957231164162481843653503E-35Q, /* bf8db6e71158e7bf93e2e683f07aa841 */
- -4.27246093749991203999790346349633286E-04Q, /* bff3bffffffffff5dbe103cba0eb2000 */
- -3.51191203319375193921924105905691755E-35Q, /* bf8c757356d0f3dd7fbefc0dd419ab50 */
- -3.96728515624986649402960638705483281E-04Q, /* bff39ffffffffff09b996882706ec000 */
- -5.51925962073095883016589497244931171E-36Q, /* bf89d586d49f22289cfc860bebb99056 */
- -3.66210937499999945095511981300980754E-04Q, /* bff37fffffffffffefcb88bfc7df6000 */
- -2.11696465278144529364423332249588595E-35Q, /* bf8bc23a84d28e5496c874ef9833be25 */
- -3.35693359374992480958458008559640163E-04Q, /* bff35ffffffffff754c548a8798f2000 */
- -8.58941791799705081104736787493668352E-35Q, /* bf8dc8b1192fb7c3662826d43acb7c68 */
- -3.05175781250009811036303273640122156E-04Q, /* bff340000000000b4fb4f1aad1c76000 */
- -8.61173897858769926480551302277426632E-35Q, /* bf8dc9e0eabb1c0b33051011b64769fa */
- -2.74658203124987298321920308390303850E-04Q, /* bff31ffffffffff15b2056ac252fd000 */
- 3.35152809454778381053519808988046631E-37Q, /* 3f85c82fb59ff8d7c80d44e635420ab1 */
- -2.44140624999999992770514819575735516E-04Q, /* bff2fffffffffffffbbb82d6a7636000 */
- 3.54445837111124472730013879165516908E-35Q, /* 3f8c78e955b01378be647b1c92aa9a77 */
- -2.13623046875012756463165168672749438E-04Q, /* bff2c0000000001d6a1635fea6bbf000 */
- 1.50050816288650121729916777279129473E-35Q, /* 3f8b3f1f6f616a61129a58e131cbd31d */
- -1.83105468749991323078784464300306893E-04Q, /* bff27fffffffffebfe0cbd0c82399000 */
- -9.14919506501448661140572099029756008E-37Q, /* bf873754bacaa9d9513b6127e791eb47 */
- -1.52587890625013337032336300236461546E-04Q, /* bff240000000001ec0cb57f2cc995000 */
- 2.84906084373176180870418394956384516E-35Q, /* 3f8c2ef6d03a7e6ab087c4f099e4de89 */
- -1.22070312499990746786116828458007518E-04Q, /* bff1ffffffffffd553bbb49f35a34000 */
- 6.71618008964968339584520728412444537E-36Q, /* 3f8a1dacb99c60071fc9cd2349495bf0 */
- -9.15527343750029275602791047595142231E-05Q, /* bff180000000000d8040cd6ecde28000 */
- -1.95753652091078750312541716951402172E-35Q, /* bf8ba0526cfb24d8d59122f1c7a09a14 */
- -6.10351562499913258461494008080572701E-05Q, /* bff0ffffffffffaffebbb92d7f6a9000 */
- 5.69868489273961111703398456218119973E-36Q, /* 3f89e4ca5df09ef4a4386dd5b3bf0331 */
- -3.05175781250092882818419203884960853E-05Q, /* bff0000000000055ab55de88fac1d000 */
- 9.03341100018476837609128961872915953E-36Q, /* 3f8a803d229fa3a0e834a63abb06662b */
-#define T_EXPL_ARG2 (2*T_EXPL_ARG1 + 2 + 2*65)
- 0.00000000000000000000000000000000000E+00Q, /* 00000000000000000000000000000000 */
- 0.00000000000000000000000000000000000E+00Q, /* 00000000000000000000000000000000 */
- 3.05175781249814607084128277672749162E-05Q, /* 3feffffffffffeaa02abb9102f499000 */
- 1.00271855391179733380665816525889949E-36Q, /* 3f8755351afa042ac3f58114824d4c10 */
- 6.10351562500179243748093427073421439E-05Q, /* 3ff1000000000052a95de07a4c26d000 */
- 1.67231624299180373502350811501181670E-36Q, /* 3f881c87a53691cae9d77f4e40d66616 */
- 9.15527343749970728685313252158399200E-05Q, /* 3ff17ffffffffff28040cc2acde28000 */
- 2.43665747834893104318707597514407880E-36Q, /* 3f889e9366c7c6c6a2ecb78dc9b0509e */
- 1.22070312500027751961838150070880064E-04Q, /* 3ff200000000003ffddde6c153b53000 */
- -1.73322146370624186623546452226755405E-35Q, /* bf8b709d8d658ed5dbbe943de56ee84e */
- 1.52587890624995916105682628143179430E-04Q, /* 3ff23ffffffffff6954b56e285d23000 */
- 1.23580432650945898349135528000443828E-35Q, /* 3f8b06d396601dde16de7d7bc27346e6 */
- 1.83105468750008670314358488289621794E-04Q, /* 3ff2800000000013fe0cdc8c823b7000 */
- 4.30446229148833293310207915930740796E-35Q, /* 3f8cc9ba9bfe554a4f7f2fece291eb23 */
- 2.13623046875005741337455947623248132E-04Q, /* 3ff2c0000000000d3d1662de21a3f000 */
- -3.96110759869520786681660669615255057E-35Q, /* bf8ca5379b04ff4a31aab0ceacc917e6 */
- 2.44140624999981493573336463433440506E-04Q, /* 3ff2ffffffffffd553bbdf48e0534000 */
- -1.39617373942387888957350179316792928E-35Q, /* bf8b28eeedc286015802b63f96b8c5cd */
- 2.74658203124984920706309918754626834E-04Q, /* 3ff31fffffffffee9d60c8439ec1d000 */
- -3.16168080483901830349738314447356223E-36Q, /* bf890cf74f81c77a611abc1243812444 */
- 3.05175781250008648918265055410966055E-04Q, /* 3ff3400000000009f8b5c9a346636000 */
- 8.54421306185008998867856704677221443E-35Q, /* 3f8dc649cd40922fc08adc6b6b20ead0 */
- 3.35693359374988945462612499316774515E-04Q, /* 3ff35ffffffffff34146c540f15b2000 */
- 7.96443137431639500475160850431097078E-35Q, /* 3f8da77638ed3148fc4d99d1c9e13446 */
- 3.66210937500027690542093987739604535E-04Q, /* 3ff380000000001fecce34bea89c4000 */
- 2.14507323877752361258862577769090367E-35Q, /* 3f8bc834e554d38894cf91957b0253d3 */
- 3.96728515625003928083564943615052121E-04Q, /* 3ff3a00000000004875d9a4acf6ab000 */
- 4.88358523466632050664019922448605508E-35Q, /* 3f8d03a7eaeef1a9f78c71a12c44dd28 */
- 4.27246093750017799227172345607351585E-04Q, /* 3ff3c00000000014856794c3ee850000 */
- 6.66520494592631402182216588784828935E-35Q, /* 3f8d6262118fcdb59b8f16108f5f1a6c */
- 4.57763671875002108342364320152138181E-04Q, /* 3ff3e000000000026e45d855410b9000 */
- 7.21799615960261390920033272189522298E-35Q, /* 3f8d7fc645cff8879462296af975c9fd */
- 4.88281249999999768797631616370963356E-04Q, /* 3ff3ffffffffffffbbc2d7cc004df000 */
- -5.30564629906905979452258114088325361E-35Q, /* bf8d1a18b71929a30d67a217a27ae851 */
- 5.18798828124997339054881383202487041E-04Q, /* 3ff40ffffffffffe775055eea5851000 */
- -4.03682911253647925867848180522846377E-35Q, /* bf8cad44f0f3e5199d8a589d9332acad */
- 5.49316406249980511907933706754958501E-04Q, /* 3ff41ffffffffff4c410b29bb62fb000 */
- -2.08166843948323917121806956728438051E-35Q, /* bf8bbab8cf691403249fe5b699e25143 */
- 5.79833984374989593561576568548497165E-04Q, /* 3ff42ffffffffffa0047df328d817000 */
- -1.72745033420153042445343706432627539E-34Q, /* bf8ecb3c2d7d3a9e6e960576be901fdf */
- 6.10351562500008540711511259540838154E-04Q, /* 3ff4400000000004ec62f54f8c271000 */
- 7.41889382604319545724663095428976499E-35Q, /* 3f8d8a74c002c81a47c93b8e05d15f8e */
- 6.40869140625020444702875407535884986E-04Q, /* 3ff450000000000bc91b09718515d000 */
- -4.47321009727305792048065440180490107E-35Q, /* bf8cdbac5c8fe70822081d8993eb5cb6 */
- 6.71386718750007531635964622352684074E-04Q, /* 3ff460000000000457792973db05c000 */
- 5.13698959677949336513874456684462092E-35Q, /* 3f8d112114436949c5ef38d8049004ab */
- 7.01904296875006634673332887754430334E-04Q, /* 3ff4700000000003d31adf2cb8b1d000 */
- -8.25665755717729437292989870760751482E-35Q, /* bf8db6ffcc8ef71f8e648e3a8b160f5a */
- 7.32421874999998244664170215504673504E-04Q, /* 3ff47ffffffffffefcf5498bd5c8a000 */
- -5.64005234937832153139057628112753364E-35Q, /* bf8d2be06a1dfe90e7bf90fba7c12a98 */
- 7.62939453125017456345986752604096408E-04Q, /* 3ff490000000000a101a1b093d4a8000 */
- -1.11084094120417622468550608896588329E-34Q, /* bf8e274feabd2d94f6694507a46accb1 */
- 7.93457031249987558617598988993908016E-04Q, /* 3ff49ffffffffff8d3f9dcab74bbf000 */
- -1.22966480225449015129079129940978828E-34Q, /* bf8e46e6a65eef8fa9e42eddf3da305e */
- 8.23974609374997378723747633335135819E-04Q, /* 3ff4affffffffffe7d2afbaa55b26000 */
- -1.62270010016794279091906973366704963E-34Q, /* bf8eaf633f057ebdb664a34566401c4e */
- 8.54492187500023938282350821569920958E-04Q, /* 3ff4c0000000000dccaabce399e59000 */
- -1.39076361712838158775374263169606160E-34Q, /* bf8e71ba779364b3bbdba7841f2c4ca1 */
- 8.85009765624987932362186815286691297E-04Q, /* 3ff4cffffffffff90b218886edc2a000 */
- 4.07328275060905585228261577392403980E-35Q, /* 3f8cb1254dbb6ea4b8cfa5ed4cf28d24 */
- 9.15527343749975579461305518559161974E-04Q, /* 3ff4dffffffffff1ec2a21f25df33000 */
- 1.16855112459192484947855553716334015E-35Q, /* 3f8af10bf319e9f5270cf249eeffbe5c */
- 9.46044921875016761584725882821122521E-04Q, /* 3ff4f00000000009a992c46c16d71000 */
- 9.51660680007524262741115611071680436E-35Q, /* 3f8df9fd56e81f8edf133843910ee831 */
- 9.76562499999974118878133088548272636E-04Q, /* 3ff4fffffffffff1149edc46a6df6000 */
- -5.65271128977550656964071208289181661E-36Q, /* bf89e0e12689dd721aa2314c81eb6429 */
- 1.00708007812498671732140389760347830E-03Q, /* 3ff507fffffffffc2be94b90ed091000 */
- -1.43355074891483635310132767255371379E-34Q, /* bf8e7d1a688c247b16022daab1316d55 */
- 1.03759765625002637786192745235343007E-03Q, /* 3ff51000000000079a57b966bc158000 */
- 2.95905815240957629366749917020106928E-34Q, /* 3f8f895387fc73bb38f8a1b254c01a60 */
- 1.06811523437500860568717813047520763E-03Q, /* 3ff51800000000027afcd5b35f5e6000 */
- -5.98328495358586628195372356742878314E-35Q, /* bf8d3e204130013bf6328f1b70ff8c76 */
- 1.09863281250001439958487251556220070E-03Q, /* 3ff5200000000004268077c6c66bd000 */
- 2.41371837889426603334113000868144760E-34Q, /* 3f8f40d6948edf864054ccf151f9815e */
- 1.12915039062501298413451613770002366E-03Q, /* 3ff5280000000003be0f5dd8fe81b000 */
- -1.28815268997394164973472617519705703E-34Q, /* bf8e567321172ea089dce4bc8354ecb7 */
- 1.15966796874997272036339054191407232E-03Q, /* 3ff52ffffffffff8231e3bcfff1e8000 */
- 1.02996064554316248496839462594377804E-34Q, /* 3f8e11cf7d402789244f68e2d4f985b1 */
- 1.19018554687502744121802585360546796E-03Q, /* 3ff5380000000007e8cdf3f8f6c20000 */
- -1.43453217726255628994625761307322163E-34Q, /* bf8e7d5d3370d85a374f5f4802fc517a */
- 1.22070312499997743541996266398850614E-03Q, /* 3ff53ffffffffff97f0722561f454000 */
- -1.41086259180534339713692694428211646E-34Q, /* bf8e77125519ff76244dfec5fbd58402 */
- 1.25122070312501024092560690174507039E-03Q, /* 3ff5480000000002f3a59d8820691000 */
- 3.84102646020099293168698506729765213E-34Q, /* 3f8ffe8f5b86f9c3569c8f26e19b1f50 */
- 1.28173828124997986521442660131425390E-03Q, /* 3ff54ffffffffffa3250a764439d9000 */
- 1.44644589735033114377952806106652650E-34Q, /* 3f8e808801b80dcf38323cdbfdca2549 */
- 1.31225585937501665804856968749058137E-03Q, /* 3ff5580000000004cd25a414c6d62000 */
- 1.67474574742200577294563576414361377E-34Q, /* 3f8ebd394a151dbda4f81d5d83c0f1e9 */
- 1.34277343749997290265837386401818888E-03Q, /* 3ff55ffffffffff83091b042cfd59000 */
- -1.55650565030381326742591837551559103E-34Q, /* bf8e9dca490d7fecfadba9625ffb91c5 */
- 1.37329101562497720784949380297774268E-03Q, /* 3ff567fffffffff96e3c7312f5ccf000 */
- 1.65279335325630026116581677369221748E-34Q, /* 3f8eb763496f5bd7404f2298b402074f */
- 1.40380859374999099958354100336136647E-03Q, /* 3ff56ffffffffffd67e2f09f2a381000 */
- 1.89919944388961890195706641264717076E-34Q, /* 3f8ef8e4d0ffdfeba982aa8829501389 */
- 1.43432617187497484122173130998160625E-03Q, /* 3ff577fffffffff8bf9c1d71af8a8000 */
- 2.57638517142061429772064578590009568E-34Q, /* 3f8f5675d82c1cc4ada70fd3a957b89a */
- 1.46484374999999929342158925502052945E-03Q, /* 3ff57fffffffffffcbdd1c7671b46000 */
- 1.76487201934184070490166772482073801E-34Q, /* 3f8ed52ef732458f6e4c5c07504f33cc */
- 1.49536132812502318451070466256902933E-03Q, /* 3ff5880000000006aeb7066c8ad43000 */
- 2.38068367275295804321313550609246656E-34Q, /* 3f8f3c7277ae6fc390ace5e06c0b025b */
- 1.52587890625000448053340248672949543E-03Q, /* 3ff59000000000014a9ae2104b3bc000 */
- 1.01174455568392813258454590274740959E-34Q, /* 3f8e0cf7c434762991bb38e12acee215 */
- 1.55639648437501113499837053523090913E-03Q, /* 3ff5980000000003359e2c204355e000 */
- -2.82398418808099749023517211651363693E-35Q, /* bf8c2c4c2971d88caa95e15fb1ccb1a1 */
- 1.58691406249999937955142588308171026E-03Q, /* 3ff59fffffffffffd2380ecbc87c2000 */
- -1.27361695572422741562701199136538047E-34Q, /* bf8e5295e0e206dfb0f0266c07225448 */
- 1.61743164062498000531048954475329309E-03Q, /* 3ff5a7fffffffffa3ca6fe61ed94c000 */
- -1.22606548862580061633942923016222044E-34Q, /* bf8e45f1b17bb61039d21a351bb207b8 */
- 1.64794921875001835451453858682255576E-03Q, /* 3ff5b000000000054a52fa20f6565000 */
- 1.39132339594152335892305491425264583E-34Q, /* 3f8e71e0904c5449b414ee49b191cef2 */
- 1.67846679687501263995029340691547953E-03Q, /* 3ff5b80000000003a4a9e912c910b000 */
- 6.67245854693585315412242764786197029E-35Q, /* 3f8d62c4ccac1e7511a617d469468ccd */
- 1.70898437500002646861403514115369655E-03Q, /* 3ff5c00000000007a109fbaa7e015000 */
- 6.87367172354719289559624829652240928E-36Q, /* 3f8a245fa835eceb42bae8128d9336db */
- 1.73950195312501174308226096992992128E-03Q, /* 3ff5c80000000003627c8d637a005000 */
- -2.20824271875474985927385878948759352E-34Q, /* bf8f25869b1cbefb25e735992f232f57 */
- 1.77001953124997491747605207736194513E-03Q, /* 3ff5cffffffffff8c53c84b6883b8000 */
- 3.43123048533596296514343180408963705E-34Q, /* 3f8fc816b91d173ddadbbf09b1287906 */
- 1.80053710937497698911127570705069398E-03Q, /* 3ff5d7fffffffff95e1899f4a8430000 */
- 3.99231237340890073475077494556136100E-35Q, /* 3f8ca889148f62fa854da5674df41279 */
- 1.83105468750002267094899598630423914E-03Q, /* 3ff5e0000000000688d21e62ba674000 */
- -3.22274595655810623999007524769365273E-34Q, /* bf8fac605cb9ae01eb719675ced25560 */
- 1.86157226562500499224728040579690330E-03Q, /* 3ff5e80000000001705ce28a6d89e000 */
- 3.07094985075881613489605622068441083E-34Q, /* 3f8f98330225ec7e2c8f3c0d1c432b91 */
- 1.89208984374998234666824993196980949E-03Q, /* 3ff5effffffffffae969fdc7cd8cf000 */
- -3.06287628722973914692165056776495733E-34Q, /* bf8f9720477d9cfa10e464df7f91020c */
- 1.92260742187501225343755557292811682E-03Q, /* 3ff5f800000000038824e428ed49a000 */
- 6.30049124729794620592961282769623368E-35Q, /* 3f8d4efdd7cd4336d88a6aa49e1e96bc */
- 1.95312499999998514894032051116231258E-03Q, /* 3ff5fffffffffffbb82f6a04f1ae0000 */
- -6.14610057507500948543216998736262902E-35Q, /* bf8d46c862d39255370e7974d48daa7e */
- 1.98364257812501222021119324146882732E-03Q, /* 3ff6040000000001c2d8a1aa5188d000 */
- 3.71942298418113774118754986159801984E-34Q, /* 3f8fee6567d9940495519ffe62cbc9a4 */
-
- 7.06341639425619532977052017486130353E-01Q, /* 3ffe69a59c8245a9ac00000000000000 */
- 7.09106182437398424589503065362805501E-01Q, /* 3ffe6b0ff72deb89d000000000000000 */
- 7.11881545564596485142772053222870454E-01Q, /* 3ffe6c7bbce9a6d93000000000000000 */
- 7.14667771155948150507697391731198877E-01Q, /* 3ffe6de8ef213d71e000000000000000 */
- 7.17464901725936049503573599395167548E-01Q, /* 3ffe6f578f41e1a9e400000000000000 */
- 7.20272979955439790478166628417966422E-01Q, /* 3ffe70c79eba33c06c00000000000000 */
- 7.23092048692387218133958981525211129E-01Q, /* 3ffe72391efa434c7400000000000000 */
- 7.25922150952408251622927082280511968E-01Q, /* 3ffe73ac117390acd800000000000000 */
- 7.28763329919491220643124052003258839E-01Q, /* 3ffe752077990e79d000000000000000 */
- 7.31615628946641782803794740175362676E-01Q, /* 3ffe769652df22f7e000000000000000 */
- 7.34479091556544505525749855223693885E-01Q, /* 3ffe780da4bba98c4800000000000000 */
- 7.37353761442226890432394270646909717E-01Q, /* 3ffe79866ea5f432d400000000000000 */
- 7.40239682467726090031590047146892175E-01Q, /* 3ffe7b00b216ccf53000000000000000 */
- 7.43136898668758316688354170764796436E-01Q, /* 3ffe7c7c70887763c000000000000000 */
- 7.46045454253390638577059235103661194E-01Q, /* 3ffe7df9ab76b20fd000000000000000 */
- 7.48965393602715662213498148958024103E-01Q, /* 3ffe7f78645eb8076400000000000000 */
- 7.51896761271528629722027403659012634E-01Q, /* 3ffe80f89cbf42526400000000000000 */
- 7.54839601989007347171423134568613023E-01Q, /* 3ffe827a561889716000000000000000 */
- 7.57793960659394638668118204805068672E-01Q, /* 3ffe83fd91ec46ddc000000000000000 */
- 7.60759882362683631518152083117456641E-01Q, /* 3ffe858251bdb68b8c00000000000000 */
- 7.63737412355305483879774897104653064E-01Q, /* 3ffe87089711986c9400000000000000 */
- 7.66726596070820082262642358728044201E-01Q, /* 3ffe8890636e31f54400000000000000 */
- 7.69727479120609181517664865168626420E-01Q, /* 3ffe8a19b85b4fa2d800000000000000 */
- 7.72740107294572486917871856348938309E-01Q, /* 3ffe8ba4976246833800000000000000 */
- 7.75764526561826289752232810315035749E-01Q, /* 3ffe8d31020df5be4400000000000000 */
- 7.78800783071404878477039801509818062E-01Q, /* 3ffe8ebef9eac820b000000000000000 */
- 7.81848923152964780936002853195532225E-01Q, /* 3ffe904e8086b5a87800000000000000 */
- 7.84908993317491698871180005880887620E-01Q, /* 3ffe91df97714512d800000000000000 */
- 7.87981040258010162480317717381694820E-01Q, /* 3ffe9372403b8d6bcc00000000000000 */
- 7.91065110850296016042904057030682452E-01Q, /* 3ffe95067c78379f2800000000000000 */
- 7.94161252153591734614934694036492147E-01Q, /* 3ffe969c4dbb800b4800000000000000 */
- 7.97269511411324433014513601847284008E-01Q, /* 3ffe9833b59b38154400000000000000 */
- 8.00389936051826789142893403550260700E-01Q, /* 3ffe99ccb5aec7bec800000000000000 */
- 8.03522573689060742863077280162542593E-01Q, /* 3ffe9b674f8f2f3d7c00000000000000 */
- 8.06667472123343942680406826184480451E-01Q, /* 3ffe9d0384d70893f800000000000000 */
- 8.09824679342079301047618855591281317E-01Q, /* 3ffe9ea15722892c7800000000000000 */
- 8.12994243520486992160556383169023320E-01Q, /* 3ffea040c80f8374f000000000000000 */
- 8.16176213022339780422953481320291758E-01Q, /* 3ffea1e1d93d687d0000000000000000 */
- 8.19370636400700819157449927843117621E-01Q, /* 3ffea3848c4d49954c00000000000000 */
- 8.22577562398664585696650419777142815E-01Q, /* 3ffea528e2e1d9f09800000000000000 */
- 8.25797039950100647542896581398963463E-01Q, /* 3ffea6cede9f70467c00000000000000 */
- 8.29029118180400342863478613253391813E-01Q, /* 3ffea876812c0877bc00000000000000 */
- 8.32273846407226292054559735333896242E-01Q, /* 3ffeaa1fcc2f45343800000000000000 */
- 8.35531274141265073440720811959181447E-01Q, /* 3ffeabcac15271a2a400000000000000 */
- 8.38801451086982535754188461396552157E-01Q, /* 3ffead7762408309bc00000000000000 */
- 8.42084427143382358016410194068157580E-01Q, /* 3ffeaf25b0a61a7b4c00000000000000 */
- 8.45380252404767357221615498019673396E-01Q, /* 3ffeb0d5ae318680c400000000000000 */
- 8.48688977161503960155997106085123960E-01Q, /* 3ffeb2875c92c4c99400000000000000 */
- 8.52010651900789478530029441571969073E-01Q, /* 3ffeb43abd7b83db1c00000000000000 */
- 8.55345327307422548246407245642330963E-01Q, /* 3ffeb5efd29f24c26400000000000000 */
- 8.58693054264576483003423845730139874E-01Q, /* 3ffeb7a69db2bcc77800000000000000 */
- 8.62053883854575708767242758767679334E-01Q, /* 3ffeb95f206d17228000000000000000 */
- 8.65427867359675251357487013592617586E-01Q, /* 3ffebb195c86b6b29000000000000000 */
- 8.68815056262843166123843730019871145E-01Q, /* 3ffebcd553b9d7b62000000000000000 */
- 8.72215502248546159513864495238522068E-01Q, /* 3ffebe9307c271855000000000000000 */
- 8.75629257203538208242932228131394368E-01Q, /* 3ffec0527a5e384ddc00000000000000 */
- 8.79056373217652342599848225290770642E-01Q, /* 3ffec213ad4c9ed0d800000000000000 */
- 8.82496902584595399599010079327854328E-01Q, /* 3ffec3d6a24ed8221800000000000000 */
- 8.85950897802745995779361010136199184E-01Q, /* 3ffec59b5b27d9696800000000000000 */
- 8.89418411575955636383383762222365476E-01Q, /* 3ffec761d99c5ba58800000000000000 */
- 8.92899496814352794382685374330321793E-01Q, /* 3ffec92a1f72dd70d400000000000000 */
- 8.96394206635150403439382671422208659E-01Q, /* 3ffecaf42e73a4c7d800000000000000 */
- 8.99902594363456265202927397695020773E-01Q, /* 3ffeccc00868c0d18800000000000000 */
- 9.03424713533086704009278378180169966E-01Q, /* 3ffece8daf1e0ba94c00000000000000 */
- 9.06960617887383580004723171441582963E-01Q, /* 3ffed05d24612c2af000000000000000 */
- 9.10510361380034133338412516422977205E-01Q, /* 3ffed22e6a0197c02c00000000000000 */
- 9.14073998175894436579724811053893063E-01Q, /* 3ffed40181d094303400000000000000 */
- 9.17651582651815816982221463149471674E-01Q, /* 3ffed5d66da13970f400000000000000 */
- 9.21243169397474526149949269893113524E-01Q, /* 3ffed7ad2f48737a2000000000000000 */
- 9.24848813216204823639543519675498828E-01Q, /* 3ffed985c89d041a3000000000000000 */
- 9.28468569125835141431224428743007593E-01Q, /* 3ffedb603b7784cd1800000000000000 */
- 9.32102492359527579068867453315760940E-01Q, /* 3ffedd3c89b26894e000000000000000 */
- 9.35750638366620729469147477175283711E-01Q, /* 3ffedf1ab529fdd41c00000000000000 */
- 9.39413062813475779888605643463961314E-01Q, /* 3ffee0fabfbc702a3c00000000000000 */
- 9.43089821584325888048638830696290825E-01Q, /* 3ffee2dcab49ca51b400000000000000 */
- 9.46780970782128888929563004239753354E-01Q, /* 3ffee4c079b3f8000400000000000000 */
- 9.50486566729423443256052905780961737E-01Q, /* 3ffee6a62cdec7c7b000000000000000 */
- 9.54206665969188322362626308859034907E-01Q, /* 3ffee88dc6afecfbfc00000000000000 */
- 9.57941325265705301283958306157728657E-01Q, /* 3ffeea77490f0196b000000000000000 */
- 9.61690601605425299247542625380447134E-01Q, /* 3ffeec62b5e5881fb000000000000000 */
- 9.65454552197837823079851204965962097E-01Q, /* 3ffeee500f1eed967000000000000000 */
- 9.69233234476344074348475032820715569E-01Q, /* 3ffef03f56a88b5d7800000000000000 */
- 9.73026706099133165128733935489435680E-01Q, /* 3ffef2308e71a927a800000000000000 */
- 9.76835024950062025261843245971249416E-01Q, /* 3ffef423b86b7ee79000000000000000 */
- 9.80658249139538557015427500118676107E-01Q, /* 3ffef618d68936c09c00000000000000 */
- 9.84496437005408397968864164795377292E-01Q, /* 3ffef80feabfeefa4800000000000000 */
- 9.88349647113845042323276857132441364E-01Q, /* 3ffefa08f706bbf53800000000000000 */
- 9.92217938260243514925207364285597578E-01Q, /* 3ffefc03fd56aa225000000000000000 */
- 9.96101369470117486981664001177705359E-01Q, /* 3ffefe00ffaabffbbc00000000000000 */
-#define T_EXPL_RES1 (T_EXPL_ARG2 + 2 + 2*65 + 89)
- 1.00000000000000000000000000000000000E+00Q, /* 3fff0000000000000000000000000000 */
- 1.00391388933834757590801700644078664E+00Q, /* 3fff0100802ab5577800000000000000 */
- 1.00784309720644799091004983893071767E+00Q, /* 3fff0202015600445c00000000000000 */
- 1.01178768355933151879000320150225889E+00Q, /* 3fff0304848362076c00000000000000 */
- 1.01574770858668572692806719715008512E+00Q, /* 3fff04080ab55de39000000000000000 */
- 1.01972323271377413034244341361045372E+00Q, /* 3fff050c94ef7a206c00000000000000 */
- 1.02371431660235789884438872832106426E+00Q, /* 3fff06122436410dd000000000000000 */
- 1.02772102115162167201845022646011785E+00Q, /* 3fff0718b98f42085000000000000000 */
- 1.03174340749910264936062276319717057E+00Q, /* 3fff08205601127ec800000000000000 */
- 1.03578153702162378824169763902318664E+00Q, /* 3fff0928fa934ef90800000000000000 */
- 1.03983547133622999947277776300325058E+00Q, /* 3fff0a32a84e9c1f5800000000000000 */
- 1.04390527230112850620713516036630608E+00Q, /* 3fff0b3d603ca7c32800000000000000 */
- 1.04799100201663270004459604933799710E+00Q, /* 3fff0c49236829e8bc00000000000000 */
- 1.05209272282610977189420964350574650E+00Q, /* 3fff0d55f2dce5d1e800000000000000 */
- 1.05621049731693195106174698594259098E+00Q, /* 3fff0e63cfa7ab09d000000000000000 */
- 1.06034438832143151909548350886325352E+00Q, /* 3fff0f72bad65671b800000000000000 */
- 1.06449445891785943185681162503897212E+00Q, /* 3fff1082b577d34ed800000000000000 */
- 1.06866077243134810492719566354935523E+00Q, /* 3fff1193c09c1c595c00000000000000 */
- 1.07284339243487741866189821848820429E+00Q, /* 3fff12a5dd543ccc4c00000000000000 */
- 1.07704238275024494209120007326419000E+00Q, /* 3fff13b90cb25176a400000000000000 */
- 1.08125780744903959851299646288680378E+00Q, /* 3fff14cd4fc989cd6400000000000000 */
- 1.08548973085361949442173568058933597E+00Q, /* 3fff15e2a7ae28fecc00000000000000 */
- 1.08973821753809324563988525369495619E+00Q, /* 3fff16f9157587069400000000000000 */
- 1.09400333232930546678574046381982043E+00Q, /* 3fff18109a3611c35000000000000000 */
- 1.09828514030782586896606289883493446E+00Q, /* 3fff192937074e0cd800000000000000 */
- 1.10258370680894224324930519287590869E+00Q, /* 3fff1a42ed01d8cbc800000000000000 */
- 1.10689909742365749645287564817408565E+00Q, /* 3fff1b5dbd3f68122400000000000000 */
- 1.11123137799969046168868658241990488E+00Q, /* 3fff1c79a8dacc350c00000000000000 */
- 1.11558061464248076122274255794764031E+00Q, /* 3fff1d96b0eff0e79400000000000000 */
- 1.11994687371619722204840741142106708E+00Q, /* 3fff1eb4d69bde569c00000000000000 */
- 1.12433022184475073235176978414529003E+00Q, /* 3fff1fd41afcba45e800000000000000 */
- 1.12873072591281087273529237791080959E+00Q, /* 3fff20f47f31c92e4800000000000000 */
- 1.13314845306682632219974493636982515E+00Q, /* 3fff2216045b6f5cd000000000000000 */
- 1.13758347071604959399593326452304609E+00Q, /* 3fff2338ab9b32134800000000000000 */
- 1.14203584653356560174586320499656722E+00Q, /* 3fff245c7613b8a9b000000000000000 */
- 1.14650564845732405583333957110880874E+00Q, /* 3fff258164e8cdb0d800000000000000 */
- 1.15099294469117646722011727433709893E+00Q, /* 3fff26a7793f60164400000000000000 */
- 1.15549780370591653744227755851170514E+00Q, /* 3fff27ceb43d84490400000000000000 */
- 1.16002029424032515603215642840950750E+00Q, /* 3fff28f7170a755fd800000000000000 */
- 1.16456048530221917269855680387991015E+00Q, /* 3fff2a20a2ce96406400000000000000 */
- 1.16911844616950438835445424956560601E+00Q, /* 3fff2b4b58b372c79400000000000000 */
- 1.17369424639123270948104504896036815E+00Q, /* 3fff2c7739e3c0f32c00000000000000 */
- 1.17828795578866324378353169777255971E+00Q, /* 3fff2da4478b620c7400000000000000 */
- 1.18289964445632783673900689791480545E+00Q, /* 3fff2ed282d763d42400000000000000 */
- 1.18752938276310060494722620205720887E+00Q, /* 3fff3001ecf601af7000000000000000 */
- 1.19217724135327157730657177125976887E+00Q, /* 3fff31328716a5d63c00000000000000 */
- 1.19684329114762477708211463323095813E+00Q, /* 3fff32645269ea829000000000000000 */
- 1.20152760334452030077656559114984702E+00Q, /* 3fff339750219b212c00000000000000 */
- 1.20623024942098072687102217059873510E+00Q, /* 3fff34cb8170b5835400000000000000 */
- 1.21095130113378179892436037334846333E+00Q, /* 3fff3600e78b6b11d000000000000000 */
- 1.21569083052054743854242246925423387E+00Q, /* 3fff373783a722012400000000000000 */
- 1.22044890990084875515009343871497549E+00Q, /* 3fff386f56fa7686e800000000000000 */
- 1.22522561187730755216662714701669756E+00Q, /* 3fff39a862bd3c106400000000000000 */
- 1.23002100933670455162882717559114099E+00Q, /* 3fff3ae2a8287e7a8000000000000000 */
- 1.23483517545109100499445276000187732E+00Q, /* 3fff3c1e2876834aa800000000000000 */
- 1.23966818367890557750499169742397498E+00Q, /* 3fff3d5ae4e2cae92c00000000000000 */
- 1.24452010776609517384017067342938390E+00Q, /* 3fff3e98deaa11dcbc00000000000000 */
- 1.24939102174724003813111039562500082E+00Q, /* 3fff3fd8170a52071800000000000000 */
- 1.25428099994668373895478907797951251E+00Q, /* 3fff41188f42c3e32000000000000000 */
- 1.25919011697966698459794088194030337E+00Q, /* 3fff425a4893dfc3f800000000000000 */
- 1.26411844775346637881341393949696794E+00Q, /* 3fff439d443f5f159000000000000000 */
- 1.26906606746853711786826579555054195E+00Q, /* 3fff44e183883d9e4800000000000000 */
- 1.27403305161966090564007458851847332E+00Q, /* 3fff462707b2bac20c00000000000000 */
- 1.27901947599709753244923149395617656E+00Q, /* 3fff476dd2045ac67800000000000000 */
- 1.28402541668774150540599521264084615E+00Q, /* 3fff48b5e3c3e8186800000000000000 */
- 1.28905095007628295311619126550795045E+00Q, /* 3fff49ff3e397492bc00000000000000 */
- 1.29409615284637330434591717676084954E+00Q, /* 3fff4b49e2ae5ac67400000000000000 */
- 1.29916110198179535206719492634874769E+00Q, /* 3fff4c95d26d3f440800000000000000 */
- 1.30424587476763775839572190307080746E+00Q, /* 3fff4de30ec211e60000000000000000 */
- 1.30935054879147461104338390214252286E+00Q, /* 3fff4f3198fa0f1cf800000000000000 */
- 1.31447520194454914310711046709911898E+00Q, /* 3fff50817263c13cd000000000000000 */
- 1.31961991242296217130558488861424848E+00Q, /* 3fff51d29c4f01cb3000000000000000 */
- 1.32478475872886558573071624778094701E+00Q, /* 3fff5325180cfacf7800000000000000 */
- 1.32996981967165983640200010995613411E+00Q, /* 3fff5478e6f02823d000000000000000 */
- 1.33517517436919680440254865061433520E+00Q, /* 3fff55ce0a4c58c7bc00000000000000 */
- 1.34040090224898678084031189428060316E+00Q, /* 3fff57248376b033d800000000000000 */
- 1.34564708304941055283521222918352578E+00Q, /* 3fff587c53c5a7af0400000000000000 */
- 1.35091379682093615244298234756570309E+00Q, /* 3fff59d57c910fa4e000000000000000 */
- 1.35620112392734021300455538039386738E+00Q, /* 3fff5b2fff3210fd9400000000000000 */
- 1.36150914504693443252136830778908916E+00Q, /* 3fff5c8bdd032e770800000000000000 */
- 1.36683794117379636690046140756749082E+00Q, /* 3fff5de9176045ff5400000000000000 */
- 1.37218759361900544124779344201670028E+00Q, /* 3fff5f47afa69210a800000000000000 */
- 1.37755818401188367960941150158760138E+00Q, /* 3fff60a7a734ab0e8800000000000000 */
- 1.38294979430124120867162673675920814E+00Q, /* 3fff6208ff6a88a46000000000000000 */
- 1.38836250675662681297595213436579797E+00Q, /* 3fff636bb9a983258400000000000000 */
- 1.39379640396958309755959248832368758E+00Q, /* 3fff64cfd75454ee7c00000000000000 */
- 1.39925156885490681313299887733592186E+00Q, /* 3fff663559cf1bc7c400000000000000 */
- 1.40472808465191417726103395580139477E+00Q, /* 3fff679c427f5a49f400000000000000 */
- 1.41022603492571069194738697660795879E+00Q, /* 3fff690492cbf9432c00000000000000 */
- 1.41574550356846662335641440222389065E+00Q, /* 3fff6a6e4c1d491e1800000000000000 */
-
- 9.98018323540573404351050612604012713E-01Q, /* 3ffefefc41f8d4bdb000000000000000 */
- 9.98048781107475468932221929208026268E-01Q, /* 3ffeff003ff556aa8800000000000000 */
- 9.98079239603882895082165305211674422E-01Q, /* 3ffeff043df9d4986000000000000000 */
- 9.98109699029824021243584297735651489E-01Q, /* 3ffeff083c064e972c00000000000000 */
- 9.98140159385327269125909310787392315E-01Q, /* 3ffeff0c3a1ac4b6ec00000000000000 */
- 9.98170620670420977171843901487591211E-01Q, /* 3ffeff10383737079400000000000000 */
- 9.98201082885133511579667242585856002E-01Q, /* 3ffeff14365ba5991c00000000000000 */
- 9.98231546029493238547658506831794512E-01Q, /* 3ffeff183488107b7c00000000000000 */
- 9.98262010103528552029672482603928074E-01Q, /* 3ffeff1c32bc77beb000000000000000 */
- 9.98292475107267818223988342651864514E-01Q, /* 3ffeff2030f8db72b000000000000000 */
- 9.98322941040739375573309644096298143E-01Q, /* 3ffeff242f3d3ba77000000000000000 */
- 9.98353407903971645787066790944663808E-01Q, /* 3ffeff282d89986cf000000000000000 */
- 9.98383875696992967307963340317655820E-01Q, /* 3ffeff2c2bddf1d32400000000000000 */
- 9.98414344419831761845429696222709026E-01Q, /* 3ffeff302a3a47ea0c00000000000000 */
- 9.98444814072516340086593800151604228E-01Q, /* 3ffeff34289e9ac19800000000000000 */
- 9.98475284655075123740886056111776270E-01Q, /* 3ffeff38270aea69c800000000000000 */
- 9.98505756167536479006585636852832977E-01Q, /* 3ffeff3c257f36f29400000000000000 */
- 9.98536228609928799837547330753295682E-01Q, /* 3ffeff4023fb806bf800000000000000 */
- 9.98566701982280452432050310562772211E-01Q, /* 3ffeff44227fc6e5ec00000000000000 */
- 9.98597176284619802988373749030870385E-01Q, /* 3ffeff48210c0a706800000000000000 */
- 9.98627651516975245460372434536111541E-01Q, /* 3ffeff4c1fa04b1b6800000000000000 */
- 9.98658127679375173801901155457017012E-01Q, /* 3ffeff501e3c88f6e800000000000000 */
- 9.98688604771847954211239084543194622E-01Q, /* 3ffeff541ce0c412e000000000000000 */
- 9.98719082794421980642241010173165705E-01Q, /* 3ffeff581b8cfc7f4c00000000000000 */
- 9.98749561747125619293186105096538085E-01Q, /* 3ffeff5c1a41324c2400000000000000 */
- 9.98780041629987291873504773320746608E-01Q, /* 3ffeff6018fd65896800000000000000 */
- 9.98810522443035364581476187595399097E-01Q, /* 3ffeff6417c196471000000000000000 */
- 9.98841004186298203615379520670103375E-01Q, /* 3ffeff68168dc4951400000000000000 */
- 9.98871486859804230684645176552294288E-01Q, /* 3ffeff6c1561f0837400000000000000 */
- 9.98901970463581839743127943620493170E-01Q, /* 3ffeff70143e1a222c00000000000000 */
- 9.98932454997659369233531378995394334E-01Q, /* 3ffeff74132241813000000000000000 */
- 9.98962940462065268620861502313346136E-01Q, /* 3ffeff78120e66b08400000000000000 */
- 9.98993426856827904103397486323956400E-01Q, /* 3ffeff7c110289c02000000000000000 */
- 9.99023914181975669634994119405746460E-01Q, /* 3ffeff800ffeaac00000000000000000 */
- 9.99054402437536959169506189937237650E-01Q, /* 3ffeff840f02c9c02000000000000000 */
- 9.99084891623540138905212870668037795E-01Q, /* 3ffeff880e0ee6d07800000000000000 */
- 9.99115381740013658307120181234495249E-01Q, /* 3ffeff8c0d2302010c00000000000000 */
- 9.99145872786985911329082910015131347E-01Q, /* 3ffeff900c3f1b61d800000000000000 */
- 9.99176364764485236413804614130640402E-01Q, /* 3ffeff940b633302d000000000000000 */
- 9.99206857672540083026291313217370771E-01Q, /* 3ffeff980a8f48f3f800000000000000 */
- 9.99237351511178817364822180024930276E-01Q, /* 3ffeff9c09c35d454800000000000000 */
- 9.99267846280429861138827618560753763E-01Q, /* 3ffeffa008ff7006c000000000000000 */
- 9.99298341980321608302162417203362565E-01Q, /* 3ffeffa4084381485c00000000000000 */
- 9.99328838610882452808681364331278019E-01Q, /* 3ffeffa8078f911a1800000000000000 */
- 9.99359336172140816367814863951934967E-01Q, /* 3ffeffac06e39f8bf400000000000000 */
- 9.99389834664125092933417704443854745E-01Q, /* 3ffeffb0063facadec00000000000000 */
- 9.99420334086863676459344674185558688E-01Q, /* 3ffeffb405a3b88ffc00000000000000 */
- 9.99450834440384988655026177184481639E-01Q, /* 3ffeffb8050fc3422400000000000000 */
- 9.99481335724717395718741386190231424E-01Q, /* 3ffeffbc0483ccd45c00000000000000 */
- 9.99511837939889374871071936468069907E-01Q, /* 3ffeffc003ffd556ac00000000000000 */
- 9.99542341085929264554721385138691403E-01Q, /* 3ffeffc40383dcd90800000000000000 */
- 9.99572845162865514234695751838444266E-01Q, /* 3ffeffc8030fe36b7400000000000000 */
- 9.99603350170726517864849824945849832E-01Q, /* 3ffeffcc02a3e91dec00000000000000 */
- 9.99633856109540669399038392839429434E-01Q, /* 3ffeffd0023fee006c00000000000000 */
- 9.99664362979336418302267475155531429E-01Q, /* 3ffeffd401e3f222f800000000000000 */
- 9.99694870780142130772816244643763639E-01Q, /* 3ffeffd8018ff5958800000000000000 */
- 9.99725379511986284031266336569387931E-01Q, /* 3ffeffdc0143f8682400000000000000 */
- 9.99755889174897216520321308053098619E-01Q, /* 3ffeffe000fffaaac000000000000000 */
- 9.99786399768903377704987178731244057E-01Q, /* 3ffeffe400c3fc6d6000000000000000 */
- 9.99816911294033217050269968240172602E-01Q, /* 3ffeffe8008ffdc00800000000000000 */
- 9.99847423750315072998873233700578567E-01Q, /* 3ffeffec0063feb2ac00000000000000 */
- 9.99877937137777450526954226006637327E-01Q, /* 3ffefff0003fff555800000000000000 */
- 9.99908451456448688077216502279043198E-01Q, /* 3ffefff40023ffb80000000000000000 */
- 9.99938966706357262870241697783058044E-01Q, /* 3ffefff8000fffeaac00000000000000 */
- 9.99969482887531541104308985268289689E-01Q, /* 3ffefffc0003fffd5400000000000000 */
-#define T_EXPL_RES2 (T_EXPL_RES1 + 1 + 89 + 65)
- 1.00000000000000000000000000000000000E+00Q, /* 3fff0000000000000000000000000000 */
- 1.00003051804379100575559391472779680E+00Q, /* 3fff0002000200015400000000000000 */
- 1.00006103701893306334724798034585547E+00Q, /* 3fff00040008000aac00000000000000 */
- 1.00009155692545448346209013834595680E+00Q, /* 3fff0006001200240000000000000000 */
- 1.00012207776338379883185325525118969E+00Q, /* 3fff0008002000555800000000000000 */
- 1.00015259953274932014366527255333494E+00Q, /* 3fff000a003200a6ac00000000000000 */
- 1.00018312223357958012925905677548144E+00Q, /* 3fff000c004801200400000000000000 */
- 1.00021364586590294498691378066723701E+00Q, /* 3fff000e006201c95c00000000000000 */
- 1.00024417042974783642605984823603649E+00Q, /* 3fff0010008002aab400000000000000 */
- 1.00027469592514273166727889474714175E+00Q, /* 3fff001200a203cc1000000000000000 */
- 1.00030522235211605242000132420798764E+00Q, /* 3fff001400c805357000000000000000 */
- 1.00033574971069616488250630936818197E+00Q, /* 3fff001600f206eed000000000000000 */
- 1.00036627800091160178652671675081365E+00Q, /* 3fff0018012009003800000000000000 */
- 1.00039680722279067381919048784766346E+00Q, /* 3fff001a01520b71a000000000000000 */
- 1.00042733737636191371223048918182030E+00Q, /* 3fff001c01880e4b1000000000000000 */
- 1.00045786846165368766392589350289200E+00Q, /* 3fff001e01c211948400000000000000 */
- 1.00048840047869447289485833607614040E+00Q, /* 3fff0020020015560000000000000000 */
- 1.00051893342751269111445822090900037E+00Q, /* 3fff0022024219978400000000000000 */
- 1.00054946730813676403215595200890675E+00Q, /* 3fff002402881e611000000000000000 */
- 1.00058000212059516886853316464112140E+00Q, /* 3fff002602d223baa800000000000000 */
- 1.00061053786491632733302026281307917E+00Q, /* 3fff0028032029ac4c00000000000000 */
- 1.00064107454112866113504765053221490E+00Q, /* 3fff002a0372303dfc00000000000000 */
- 1.00067161214926059198404573180596344E+00Q, /* 3fff002c03c83777b800000000000000 */
- 1.00070215068934059710059614189958666E+00Q, /* 3fff002e04223f618400000000000000 */
- 1.00073269016139709819412928482051939E+00Q, /* 3fff0030048048036000000000000000 */
- 1.00076323056545857248522679583402351E+00Q, /* 3fff003204e251655000000000000000 */
- 1.00079377190155338617216784768970683E+00Q, /* 3fff003405485b8f5000000000000000 */
- 1.00082431416971007198668530691065826E+00Q, /* 3fff003605b266896800000000000000 */
- 1.00085485736995705163820957750431262E+00Q, /* 3fff00380620725b9800000000000000 */
- 1.00088540150232269132501983222027775E+00Q, /* 3fff003a06927f0ddc00000000000000 */
- 1.00091594656683552377884893758164253E+00Q, /* 3fff003c07088ca83c00000000000000 */
- 1.00094649256352402622027852885366883E+00Q, /* 3fff003e07829b32bc00000000000000 */
- 1.00097703949241650933643654752813745E+00Q, /* 3fff00400800aab55400000000000000 */
- 1.00100758735354156137020709138596430E+00Q, /* 3fff00420882bb381000000000000000 */
- 1.00103813614692760403102056443458423E+00Q, /* 3fff00440908ccc2f000000000000000 */
- 1.00106868587260300351715613942360505E+00Q, /* 3fff00460992df5df000000000000000 */
- 1.00109923653059629256034668287611566E+00Q, /* 3fff00480a20f3111800000000000000 */
- 1.00112978812093589287002259879955091E+00Q, /* 3fff004a0ab307e46800000000000000 */
- 1.00116034064365022615561429120134562E+00Q, /* 3fff004c0b491ddfe000000000000000 */
- 1.00119089409876788066000585786241572E+00Q, /* 3fff004e0be3350b8c00000000000000 */
- 1.00122144848631711155917400901671499E+00Q, /* 3fff00500c814d6f6000000000000000 */
- 1.00125200380632656260715407370298635E+00Q, /* 3fff00520d2367136c00000000000000 */
- 1.00128256005882454449107399341301061E+00Q, /* 3fff00540dc981ffa800000000000000 */
- 1.00131311724383964545381786592770368E+00Q, /* 3fff00560e739e3c2000000000000000 */
- 1.00134367536140017618251363273884635E+00Q, /* 3fff00580f21bbd0cc00000000000000 */
- 1.00137423441153472492004539162735455E+00Q, /* 3fff005a0fd3dac5b800000000000000 */
- 1.00140479439427171337584354660066310E+00Q, /* 3fff005c1089fb22e400000000000000 */
- 1.00143535530963956325933850166620687E+00Q, /* 3fff005e11441cf05000000000000000 */
- 1.00146591715766680730226312334707472E+00Q, /* 3fff0060120240360400000000000000 */
- 1.00149647993838186721404781565070152E+00Q, /* 3fff006212c464fc0000000000000000 */
- 1.00152704365181316470412298258452211E+00Q, /* 3fff0064138a8b4a4400000000000000 */
- 1.00155760829798923250422149067162536E+00Q, /* 3fff00661454b328d800000000000000 */
- 1.00158817387693849232377374391944613E+00Q, /* 3fff00681522dc9fbc00000000000000 */
- 1.00161874038868942138336137759324629E+00Q, /* 3fff006a15f507b6f400000000000000 */
- 1.00164930783327055241471725821611471E+00Q, /* 3fff006c16cb34768800000000000000 */
- 1.00167987621071025161612055853765924E+00Q, /* 3fff006e17a562e67400000000000000 */
- 1.00171044552103705171930414508096874E+00Q, /* 3fff00701883930ec000000000000000 */
- 1.00174101576427937443369842185347807E+00Q, /* 3fff00721965c4f76c00000000000000 */
- 1.00177158694046569697988502412044909E+00Q, /* 3fff00741a4bf8a87c00000000000000 */
- 1.00180215904962455208959681840497069E+00Q, /* 3fff00761b362e29f800000000000000 */
- 1.00183273209178441698341543997230474E+00Q, /* 3fff00781c246583e400000000000000 */
- 1.00186330606697365785962006157205906E+00Q, /* 3fff007a1d169ebe3c00000000000000 */
- 1.00189388097522080744994354972732253E+00Q, /* 3fff007c1e0cd9e10800000000000000 */
- 1.00192445681655439848611877096118405E+00Q, /* 3fff007e1f0716f45000000000000000 */
- 1.00195503359100279716642489802325144E+00Q, /* 3fff0080200556001000000000000000 */
- 1.00198561129859459173374602869444061E+00Q, /* 3fff00822107970c5400000000000000 */
-};
-
-
-
-
-
-
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
/* The basic design here is from
Abraham Ziv, "Fast Evaluation of Elementary Mathematical Functions with
@@ -1019,18 +50,24 @@ static const __float128 __expq_table [] = {
- p(x) is a polynomial approximating e(x)-1
- e^(arg1[t1]_0 + arg1[t1]_1) is obtained from a table
- e^(arg2[t2]_0 + arg2[t2]_1) likewise
- - n_1 + n_0 = n, so that |n_0| < -LDBL_MIN_EXP-1.
+ - n_1 + n_0 = n, so that |n_0| < -FLT128_MIN_EXP-1.
If it happens that n_1 == 0 (this is the usual case), that multiplication
is omitted.
*/
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
+#include "quadmath-imp.h"
+#include "expq_table.h"
static const __float128 C[] = {
/* Smallest integer x for which e^x overflows. */
#define himark C[0]
11356.523406294143949491931077970765Q,
-
+
/* Largest integer x for which e^x underflows. */
#define lomark C[1]
-11433.4627433362978788372438434526231Q,
@@ -1069,11 +106,11 @@ static const __float128 C[] = {
/* 256 */
#define TWO8 C[10]
- 256.0Q,
+ 256,
/* 32768 */
#define TWO15 C[11]
- 32768.0Q,
+ 32768,
/* Chebyshev polynom coefficients for (exp(x)-1)/x */
#define P1 C[12]
@@ -1090,7 +127,6 @@ static const __float128 C[] = {
1.98412698413981650382436541785404286E-04Q,
};
-
__float128
expq (__float128 x)
{
@@ -1100,13 +136,11 @@ expq (__float128 x)
int tval1, tval2, unsafe, n_i;
__float128 x22, n, t, result, xl;
ieee854_float128 ex2_u, scale_u;
-#ifdef USE_FENV_H
fenv_t oldenv;
feholdexcept (&oldenv);
-# ifdef FE_TONEAREST
+#ifdef FE_TONEAREST
fesetround (FE_TONEAREST);
-# endif
#endif
/* Calculate n. */
@@ -1146,18 +180,18 @@ expq (__float128 x)
ex2_u.ieee.exponent += n_i >> unsafe;
/* Compute scale = 2^n_1. */
- scale_u.value = 1.0Q;
+ scale_u.value = 1;
scale_u.ieee.exponent += n_i - (n_i >> unsafe);
/* Approximate e^x2 - 1, using a seventh-degree polynomial,
with maximum error in [-2^-16-2^-53,2^-16+2^-53]
less than 4.8e-39. */
x22 = x + x*x*(P1+x*(P2+x*(P3+x*(P4+x*(P5+x*P6)))));
+ math_force_eval (x22);
/* Return result. */
-#ifdef USE_FENV_H
fesetenv (&oldenv);
-#endif
+
result = x22 * ex2_u.value + ex2_u.value;
/* Now we can test whether the result is ultimate or if we are unsure.
@@ -1169,26 +203,22 @@ expq (__float128 x)
Without proc2 routine maximum error which has been seen is
0.5000262 ulp.
- union ieee854_long_double ex3_u;
+ ieee854_float128 ex3_u;
-#ifdef USE_FENV_H
#ifdef FE_TONEAREST
fesetround (FE_TONEAREST);
#endif
-#endif
- ex3_u.d = (result - ex2_u.d) - x22 * ex2_u.d;
- ex2_u.d = result;
- ex3_u.ieee.exponent += LDBL_MANT_DIG + 15 + IEEE854_LONG_DOUBLE_BIAS
+ ex3_u.value = (result - ex2_u.value) - x22 * ex2_u.value;
+ ex2_u.value = result;
+ ex3_u.ieee.exponent += FLT128_MANT_DIG + 15 + IEEE854_FLOAT128_BIAS
- ex2_u.ieee.exponent;
- n_i = abs (ex3_u.d);
+ n_i = abs (ex3_u.value);
n_i = (n_i + 1) / 2;
-#ifdef USE_FENV_H
fesetenv (&oldenv);
#ifdef FE_TONEAREST
if (fegetround () == FE_TONEAREST)
n_i -= 0x4000;
#endif
-#endif
if (!n_i) {
return __ieee754_expl_proc2 (origx);
}
@@ -1212,7 +242,7 @@ expq (__float128 x)
/* Underflow */
return TINY * TINY;
}
-
- /* Return x, if x is a NaN or Inf; or overflow, otherwise. */
- return TWO16383*x;
+ else
+ /* Return x, if x is a NaN or Inf; or overflow, otherwise. */
+ return TWO16383*x;
}
diff --git a/libquadmath/math/expq_table.h b/libquadmath/math/expq_table.h
new file mode 100644
index 00000000000..830b32ff378
--- /dev/null
+++ b/libquadmath/math/expq_table.h
@@ -0,0 +1,970 @@
+/* Accurate table for expq().
+ Copyright (C) 1999-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jj@ultra.linux.cz>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* __expq_table basically consists of four tables, T_EXPL_ARG{1,2} and
+ T_EXPL_RES{1,2}. All tables use positive and negative indexes, the 0 points
+ are marked by T_EXPL_* defines.
+ For ARG1 and RES1 tables lets B be 89 and S 256.0, for ARG2 and RES2 B is 65
+ and S 32768.0.
+ These table have the property that, for all integers -B <= i <= B
+ expq(__expq_table[T_EXPL_ARGN+2*i]+__expq_table[T_EXPL_ARGN+2*i+1]+r) ==
+ __expq_table[T_EXPL_RESN+i], __expq_table[T_EXPL_RESN+i] is some exact number
+ with the low 58 bits of the mantissa 0,
+ __expq_table[T_EXPL_ARGN+2*i] == i/S+s
+ where absl(s) <= 2^-54 and absl(r) <= 2^-212. */
+
+static const __float128 __expq_table [] = {
+ -3.47656250000000000584188889839535373E-01Q, /* bffd640000000000002b1b04213cf000 */
+ 6.90417668990715641167244540876988960E-32Q, /* 3f97667c3fdb588a6ae1af8748357a17 */
+ -3.43749999999999981853132895957607418E-01Q, /* bffd5ffffffffffffac4ff5f4050b000 */
+ -7.16021898043268093462818380603370350E-33Q, /* bf94296c8219427edc1431ac2498583e */
+ -3.39843750000000013418643523138766329E-01Q, /* bffd5c000000000003de1f027a30e000 */
+ 8.16920774283317801641347327589583265E-32Q, /* 3f97a82b65774bdca1b4440d749ed8d3 */
+ -3.35937500000000014998092453039303051E-01Q, /* bffd5800000000000452a9f4d8857000 */
+ -6.55865578425428447938248396879359670E-32Q, /* bf97548b7d240f3d034b395e6eecfac8 */
+ -3.32031250000000000981984049529998541E-01Q, /* bffd540000000000004875277cda5000 */
+ 6.91213046334032232108944519541512737E-32Q, /* 3f9766e5f925338a19045c94443b66e1 */
+ -3.28124999999999986646017645350399708E-01Q, /* bffd4ffffffffffffc26a667bf44d000 */
+ -6.16281060996110316602421505683742661E-32Q, /* bf973ffdcdcffb6fbffc86b2b8d42f5d */
+ -3.24218749999999991645717430645867963E-01Q, /* bffd4bfffffffffffd97901063e48000 */
+ -7.90797211087760527593856542417304137E-32Q, /* bf979a9afaaca1ada6a8ed1c80584d60 */
+ -3.20312499999999998918211610690789652E-01Q, /* bffd47ffffffffffffb02d9856d71000 */
+ 8.64024799457616856987630373786503376E-32Q, /* 3f97c0a098623f95579d5d9b2b67342d */
+ -3.16406249999999998153974811017181883E-01Q, /* bffd43ffffffffffff77c991f1076000 */
+ -2.73176610180696076418536105483668404E-32Q, /* bf961baeccb32f9b1fcbb8e60468e95a */
+ -3.12500000000000011420976192575972779E-01Q, /* bffd400000000000034ab8240483d000 */
+ 7.16573502812389453744433792609989420E-32Q, /* 3f977410f4c2cfc4335f28446c0fb363 */
+ -3.08593750000000001735496343854851414E-01Q, /* bffd3c000000000000800e995c176000 */
+ -1.56292999645122272621237565671593071E-32Q, /* bf95449b9cbdaff6ac1246adb2c826ac */
+ -3.04687499999999982592401295899221626E-01Q, /* bffd37fffffffffffafb8bc1e061a000 */
+ 6.48993208584888904958594509625158417E-32Q, /* 3f9750f9fe8366d82d77afa0031a92e1 */
+ -3.00781249999999999230616898937763959E-01Q, /* bffd33ffffffffffffc73ac39da54000 */
+ 6.57082437496961397305801409357792029E-32Q, /* 3f97552d3cb598ea80135cf3feb27ec4 */
+ -2.96874999999999998788769281703245722E-01Q, /* bffd2fffffffffffffa6a07fa5021000 */
+ -3.26588297198283968096426564544269170E-32Q, /* bf9653260fc1802f46b629aee171809b */
+ -2.92968750000000015318089182805941695E-01Q, /* bffd2c0000000000046a468614bd6000 */
+ -1.73291974845198589684358727559290718E-32Q, /* bf9567e9d158f52e483c8d8dcb5961dd */
+ -2.89062500000000007736778942676309681E-01Q, /* bffd280000000000023adf9f4c3d3000 */
+ -6.83629745986675744404029225571026236E-32Q, /* bf9762f5face6281c1daf1c6aedbdb45 */
+ -2.85156250000000001367091555763661937E-01Q, /* bffd2400000000000064dfa11e3fb000 */
+ -5.44898442619766878281110054067026237E-32Q, /* bf971aed6d2db9f542986a785edae072 */
+ -2.81249999999999986958718100227029406E-01Q, /* bffd1ffffffffffffc3db9265ca9d000 */
+ 1.13007318374506125723591889451107046E-32Q, /* 3f94d569fe387f456a97902907ac3856 */
+ -2.77343750000000000356078829380495179E-01Q, /* bffd1c0000000000001a462390083000 */
+ -4.98979365468978332358409063436543102E-32Q, /* bf970315bbf3e0d14b5c94c900702d4c */
+ -2.73437499999999990276993957508540484E-01Q, /* bffd17fffffffffffd32919bcdc94000 */
+ -8.79390484115892344533724650295100871E-32Q, /* bf97c89b0b89cc19c3ab2b60da9bbbc3 */
+ -2.69531250000000002434203866460082225E-01Q, /* bffd14000000000000b39ccf9e130000 */
+ 9.44060754687026590886751809927191596E-32Q, /* 3f97ea2f32cfecca5c64a26137a9210f */
+ -2.65624999999999997296320716986257179E-01Q, /* bffd0fffffffffffff3880f13a2bc000 */
+ 2.07142664067265697791007875348396921E-32Q, /* 3f95ae37ee685b9122fbe377bd205ee4 */
+ -2.61718750000000010237478733739017956E-01Q, /* bffd0c000000000002f3648179d40000 */
+ -6.10552936159265665298996309192680256E-32Q, /* bf973d0467d31e407515a3cca0f3b4e2 */
+ -2.57812500000000011948220522778370303E-01Q, /* bffd08000000000003719f81275bd000 */
+ 6.72477169058908902499239631466443836E-32Q, /* 3f975d2b8c475d3160cf72d227d8e6f9 */
+ -2.53906249999999991822993360536596860E-01Q, /* bffd03fffffffffffda4a4b62f818000 */
+ -2.44868296623215865054704392917190994E-32Q, /* bf95fc92516c6d057d29fc2528855976 */
+ -2.49999999999999986862019457428548084E-01Q, /* bffcfffffffffffff86d2d20d5ff4000 */
+ -3.85302898949105073614122724961613078E-32Q, /* bf96901f147cb7d643af71b6129ce929 */
+ -2.46093750000000000237554160737318435E-01Q, /* bffcf8000000000000230e8ade26b000 */
+ -1.52823675242678363494345369284988589E-32Q, /* bf953d6700c5f3fc303f79d0ec8c680a */
+ -2.42187500000000003023380963205457065E-01Q, /* bffcf0000000000001be2c1a78bb0000 */
+ -7.78402037952209709489481182714311699E-34Q, /* bf9102ab1f3998e887f0ee4cf940faa5 */
+ -2.38281249999999995309623303145485725E-01Q, /* bffce7fffffffffffd4bd2940f43f000 */
+ -3.54307216794236899443913216397197696E-32Q, /* bf966fef03ab69c3f289436205b21d02 */
+ -2.34374999999999998425804947623207526E-01Q, /* bffcdfffffffffffff17b097a6092000 */
+ -2.86038428948386602859761879407549696E-32Q, /* bf96290a0eba0131efe3a05fe188f2e3 */
+ -2.30468749999999993822207406785200832E-01Q, /* bffcd7fffffffffffc70519834eae000 */
+ -2.54339521031747516806893838749365762E-32Q, /* bf96081f0ad7f9107ae6cddb32c178ab */
+ -2.26562499999999997823524030344489884E-01Q, /* bffccffffffffffffebecf10093df000 */
+ 4.31904611473158635644635628922959401E-32Q, /* 3f96c083f0b1faa7c4c686193e38d67c */
+ -2.22656250000000004835132405125162742E-01Q, /* bffcc8000000000002c98a233f19f000 */
+ 2.54709791629335691650310168420597566E-33Q, /* 3f92a735903f5eed07a716ab931e20d9 */
+ -2.18749999999999988969454021829236626E-01Q, /* bffcbffffffffffff9a42dc14ce36000 */
+ -3.77236096429336082213752014054909454E-32Q, /* bf9687be8e5b2fca54d3e81157eac660 */
+ -2.14843750000000010613256919115758495E-01Q, /* bffcb80000000000061e3d828ecac000 */
+ -4.55194148712216691177097854305964738E-32Q, /* bf96d8b35c776aa3e1a4768271380503 */
+ -2.10937499999999993204656148110447201E-01Q, /* bffcaffffffffffffc152f2aea118000 */
+ -2.95044199165561453749332254271716417E-32Q, /* bf96326433b00b2439094d9bef22ddd1 */
+ -2.07031250000000012233944895423355677E-01Q, /* bffca80000000000070d695ee0e94000 */
+ 1.93146788688385419095981415411012357E-32Q, /* 3f959126729135a5e390d4bb802a0bde */
+ -2.03125000000000008030983633336321863E-01Q, /* bffca0000000000004a129fbc51af000 */
+ 2.37361904671826193563212931215900137E-32Q, /* 3f95ecfb3c4ba1b97ea3ad45cbb1e68a */
+ -1.99218750000000001763815712796132779E-01Q, /* bffc98000000000001044b12d9950000 */
+ -3.63171243370923753295192486732883239E-33Q, /* bf932db5fb3f27c38e0fa7bbcfc64f55 */
+ -1.95312500000000004883660234506677272E-01Q, /* bffc90000000000002d0b3779d1f9000 */
+ -3.19989507343607877747980892249711601E-33Q, /* bf9309d63de96bb3ef744c865f22f1bd */
+ -1.91406250000000013720152363227519348E-01Q, /* bffc88000000000007e8bcb387121000 */
+ -1.89295754093147174148371614722178860E-32Q, /* bf958926e2e67dfe812c508290add2e7 */
+ -1.87500000000000000182342082774432620E-01Q, /* bffc800000000000001ae8b06a39f000 */
+ -2.96812835183184815200854214892983927E-32Q, /* bf96343a62d156bbe71f55d14ca4b6e5 */
+ -1.83593750000000012410147185883290345E-01Q, /* bffc78000000000007276a1adda8d000 */
+ -2.02191931237489669058466239995304587E-32Q, /* bf95a3efab92d26ec2df90df036a117f */
+ -1.79687499999999997439177363346082917E-01Q, /* bffc6ffffffffffffe8616db2927d000 */
+ -9.92752326937775530007399526834009465E-33Q, /* bf949c5f88ed17041e1a3f1829d543cd */
+ -1.75781249999999995824373974504785174E-01Q, /* bffc67fffffffffffd97c94f13ea3000 */
+ 1.44184772065335613487885714828816178E-32Q, /* 3f952b75c63476e7fcc2f5841c27bcce */
+ -1.71874999999999986685050259043077809E-01Q, /* bffc5ffffffffffff8530f6bc531a000 */
+ -3.49007014971241147689894940544402482E-32Q, /* bf966a6dfaa012aea8ffe6d90b02330f */
+ -1.67968749999999997316058782350439701E-01Q, /* bffc57fffffffffffe73eb914f2aa000 */
+ 3.34025733574205019081305778794376391E-32Q, /* 3f965adf4572561fd5456a6c13d8babf */
+ -1.64062499999999993322730602128318480E-01Q, /* bffc4ffffffffffffc269be4f68f3000 */
+ -1.83345916769684984022099095506340635E-32Q, /* bf957ccb69026cb2f6024c211576d5f4 */
+ -1.60156249999999992419000744447607979E-01Q, /* bffc47fffffffffffba13df21784a000 */
+ 2.73442789798110494773517431626534726E-32Q, /* 3f961bf58ff22c9b30f1e2b39f26d7d5 */
+ -1.56249999999999987665010524130393080E-01Q, /* bffc3ffffffffffff8e3ad45e7508000 */
+ 2.02695576464836145806428118889332191E-32Q, /* 3f95a4fb7435a4a2f71de81eb8ae75d1 */
+ -1.52343749999999989905291167951491803E-01Q, /* bffc37fffffffffffa2e48aecfc24000 */
+ -3.61436631548815190395331054871041524E-32Q, /* bf967756567ebd108075ae527cc2e7f0 */
+ -1.48437500000000006686107754967759751E-01Q, /* bffc30000000000003dab20261b3c000 */
+ -2.15524270159131591469319477922198390E-32Q, /* bf95bfa05b82ef3a708c4f0395e9fcf6 */
+ -1.44531250000000005132889939177166485E-01Q, /* bffc28000000000002f57b1969e7b000 */
+ 2.74741116529653547935086189244019604E-32Q, /* 3f961d4eb77c1185d34fe1b04a3f3cf5 */
+ -1.40625000000000000707469094533647325E-01Q, /* bffc2000000000000068676d3d5c4000 */
+ 4.40607097220049957013547629906723266E-33Q, /* 3f936e0ac425daf795b42913cf0ef881 */
+ -1.36718749999999995713752139187543306E-01Q, /* bffc17fffffffffffd87762255991000 */
+ -3.73751317180116492404578048203389108E-32Q, /* bf9684202491e9cbb7ceb67d9ff7e0c9 */
+ -1.32812500000000007198453630478482191E-01Q, /* bffc10000000000004264de3a4379000 */
+ -3.97050085179660203884930593717220728E-32Q, /* bf969c52048de14be3c9c1971e50869c */
+ -1.28906250000000006070486371645733082E-01Q, /* bffc080000000000037fd87db2cb0000 */
+ 3.59610068058504988294019521946586131E-32Q, /* 3f967570c10687cb8e9ebd0b280abf5a */
+ -1.25000000000000003700729208608337966E-01Q, /* bffc00000000000002222198bbc74000 */
+ 3.23464851393124362331846965931995969E-33Q, /* 3f930cb95da3bfc847e593716c91d57a */
+ -1.21093750000000013729038501177102555E-01Q, /* bffbf000000000000fd418d1f5fda000 */
+ 2.45242487730722066611358741283977619E-32Q, /* 3f95fd5945ad86a464292e26ac192a84 */
+ -1.17187499999999999765305306880205578E-01Q, /* bffbdfffffffffffffbabaf869845000 */
+ -1.14557520298960389903199646350205537E-32Q, /* bf94dbda735322179d9bcf392e1dd06d */
+ -1.13281250000000009579647893740755690E-01Q, /* bffbd000000000000b0b69bae7ab9000 */
+ 2.37873962873837390105423621772752350E-32Q, /* 3f95ee0b7e0bd5ac1f6fab1e2a71abc3 */
+ -1.09375000000000008981153004560108539E-01Q, /* bffbc000000000000a5ac4bc1d2c3000 */
+ 1.53152444860014076105003555837231015E-32Q, /* 3f953e15ce931e12ef9a152522e32bdd */
+ -1.05468749999999992399063850363228723E-01Q, /* bffbaffffffffffff73c998091408000 */
+ -8.75920903597804862471749360196688834E-33Q, /* bf946bd7e310a01bae5687ebdc47fcc5 */
+ -1.01562500000000007685885179918350550E-01Q, /* bffba0000000000008dc7910a648c000 */
+ -4.63820993797174451904075397785059501E-33Q, /* bf938153d0e54001a472da180fb5e8aa */
+ -9.76562499999999887262211517861331814E-02Q, /* bffb8ffffffffffff300915aa6fd6000 */
+ -2.63767025974952608658936466715705903E-33Q, /* bf92b64215bb8d520be5404620d38088 */
+ -9.37499999999999939650246024457439795E-02Q, /* bffb7ffffffffffff90aca26bd0fc000 */
+ -1.72047822349322956713582039121348377E-32Q, /* bf9565545015c5b9b56d02cfefca2c7d */
+ -8.98437500000000033088896383977486369E-02Q, /* bffb70000000000003d09ca1e3cbe000 */
+ 3.04831994420989436248526129869697270E-33Q, /* 3f92fa7d30d2ed90e7ebbd6231fd08b1 */
+ -8.59374999999999947312400115121319225E-02Q, /* bffb5ffffffffffff9ecefc03376e000 */
+ 1.50416954438393392150792422537312281E-32Q, /* 3f9538675ee99bd722fad0023c09c915 */
+ -8.20312500000000054182280847004695514E-02Q, /* bffb500000000000063f2dbd40200000 */
+ 2.68399664523430004488075638997207289E-33Q, /* 3f92bdf49766629882c49a3da88928ed */
+ -7.81250000000000114767533968079748798E-02Q, /* bffb4000000000000d3b56f81ba70000 */
+ 1.72318124201659121296305402819694281E-32Q, /* 3f9565e407aaabfb359e8a567d760de3 */
+ -7.42187500000000035531829472486812869E-02Q, /* bffb3000000000000418b6e9b5388000 */
+ 2.09401756478514117051383998628099655E-32Q, /* 3f95b2e91221fcd74be0a86d8ad658d2 */
+ -7.03124999999999987474933134860732535E-02Q, /* bffb1ffffffffffffe8e53453d2ac000 */
+ 2.28515798224350800271565551341211666E-32Q, /* 3f95da9bd6adf00894f05b5cc5530125 */
+ -6.64062500000000042267533361089054159E-02Q, /* bffb10000000000004df8473dbcf2000 */
+ 1.97576478800281368377376002585430031E-32Q, /* 3f959a59acbddb2f53bd3096b66370e9 */
+ -6.25000000000000066329769382774201686E-02Q, /* bffb00000000000007a5b5914e336000 */
+ -1.46422615813786836245343723048221678E-33Q, /* bf91e69295f069fc0c4a9db181ea25a3 */
+ -5.85937500000000002823707957982406053E-02Q, /* bffae0000000000000a6aeab10592000 */
+ 9.25637741701318872896718218457555829E-33Q, /* 3f94807eb021f1f40a37d4015b1eb76b */
+ -5.46875000000000081586888005226044448E-02Q, /* bffac0000000000012d00a3171e3a000 */
+ -4.87144542459404765480424673678105050E-33Q, /* bf9394b42faba6b7036fe7b36269daf3 */
+ -5.07812499999999927720348253140567013E-02Q, /* bffa9fffffffffffef555cc8dd914000 */
+ -3.01901021987395945826043649523451725E-33Q, /* bf92f59e7e3025691f290f8f67277faf */
+ -4.68749999999999935349476738962633103E-02Q, /* bffa7ffffffffffff117b4ea2b876000 */
+ 1.21521638219189777347767475937119750E-32Q, /* 3f94f8c7f88c5b56674b94d984ac8ecb */
+ -4.29687500000000056305562847814228219E-02Q, /* bffa6000000000000cfbb19be30c0000 */
+ -1.18643699217679276275559592978275214E-32Q, /* bf94ecd39f0833a876550e83eb012b99 */
+ -3.90624999999999962692914526031373542E-02Q, /* bffa3ffffffffffff765c743922f9000 */
+ -4.91277156857520035712509544689973679E-33Q, /* bf939823189996193872e58ac0dececb */
+ -3.51562500000000108152468207687602886E-02Q, /* bffa20000000000018f031e41177f000 */
+ 1.18599806302656253755207072755609820E-32Q, /* 3f94eca4f23e787fab73ce8f6b9b8d64 */
+ -3.12500000000000077376981036742289578E-02Q, /* bffa00000000000011d787e0b386f000 */
+ 9.97730386477005171963635210799577079E-33Q, /* 3f949e70e498c46a0173ac0d46c699fc */
+ -2.73437500000000139436129596418623235E-02Q, /* bff9c00000000000404db66e70a08000 */
+ 2.25755321633070123579875157841633859E-33Q, /* 3f927719b1a93074bdf9f3c2cb784785 */
+ -2.34375000000000088003629211828324876E-02Q, /* bff98000000000002895a27d45feb000 */
+ 2.84374279216848803102126617873942975E-33Q, /* 3f92d87f70e749d6da6c260b68dc210b */
+ -1.95312500000000107408831063404855424E-02Q, /* bff9400000000000318898ba69f71000 */
+ 2.47348089686935458989103979140011912E-33Q, /* 3f929afa3de45086fe909fdddb41edce */
+ -1.56250000000000081443917555362290635E-02Q, /* bff9000000000000258f335e9cdd6000 */
+ -2.43379314483517422161458863218426254E-33Q, /* bf9294621c8a9ccacf2b020ec19cad27 */
+ -1.17187500000000051490597418161403184E-02Q, /* bff88000000000002f7ddfa26221f000 */
+ 1.83405297208145390679150568810924707E-33Q, /* 3f9230bbfc5d5fe1b534fbcda0465bb9 */
+ -7.81249999999999715861805208310174953E-03Q, /* bff7ffffffffffffcb95f3fff157d000 */
+ 3.51548384878710915171654413641872451E-34Q, /* 3f8fd349b76c22966f77a39fc37ed704 */
+ -3.90625000000000309326013918295097128E-03Q, /* bff7000000000000390f820c8e153000 */
+ 6.38058004651791109324060099097251911E-36Q, /* 3f8a0f665d3ac25a1ac94d688273dbcd */
+#define T_EXPL_ARG1 (2*89)
+ 0.00000000000000000000000000000000000E+00Q, /* 00000000000000000000000000000000 */
+ 0.00000000000000000000000000000000000E+00Q, /* 00000000000000000000000000000000 */
+ 3.90625000000000245479958859972588985E-03Q, /* 3ff70000000000002d48769ac9874000 */
+ -6.58439598384342854976169982902779828E-36Q, /* bf8a1811b923e6c626b07ef29761482a */
+ 7.81250000000001311374391093664996358E-03Q, /* 3ff800000000000078f3f3cd89111000 */
+ 2.60265650555493781464273319671555602E-33Q, /* 3f92b070c3b635b87af426735a71fc87 */
+ 1.17187500000000269581156218247101912E-02Q, /* 3ff8800000000000f8a50d02fe20d000 */
+ 1.00961747974945520631836275894919326E-33Q, /* 3f914f80c1a4f8042044fe3b757b030b */
+ 1.56249999999999797878275270751825475E-02Q, /* 3ff8ffffffffffff45935b69da62e000 */
+ 2.03174577741375590087897353146748580E-33Q, /* 3f925194e863496e0f6e91cbf6b22e26 */
+ 1.95312499999999760319884511789111533E-02Q, /* 3ff93fffffffffff917790ff9a8f4000 */
+ 4.62788519658803722282100289809515007E-33Q, /* 3f9380783ba81295feeb3e4879d7d52d */
+ 2.34374999999999822953909016349145918E-02Q, /* 3ff97fffffffffffae5a163bd3cd5000 */
+ -3.19499956304699705390404384504876533E-33Q, /* bf93096e2037ced8194cf344c692f8d6 */
+ 2.73437500000000137220327275871555682E-02Q, /* 3ff9c000000000003f481dea5dd51000 */
+ -2.25757776523031994464630107442723424E-33Q, /* bf92771abcf988a02b414bf2614e3734 */
+ 3.12499999999999790857640618332718621E-02Q, /* 3ff9ffffffffffff9f8cd40b51509000 */
+ -4.22479470489989916319395454536511458E-33Q, /* bf935efb7245612f371deca17cb7b30c */
+ 3.51562499999999840753382405747597346E-02Q, /* 3ffa1fffffffffffdb47bd275f722000 */
+ 1.08459658374118041980976756063083500E-34Q, /* 3f8e2055d18b7117c9db1c318b1e889b */
+ 3.90624999999999989384433621470426757E-02Q, /* 3ffa3ffffffffffffd8d5e18b042e000 */
+ -7.41674226146122000759491297811091830E-33Q, /* bf94341454e48029e5b0205d91baffdc */
+ 4.29687500000000107505739500500200462E-02Q, /* 3ffa60000000000018ca04cd9085c000 */
+ -4.74689012756713017494437969420919847E-34Q, /* bf903b7c268103c6f7fbaaa24142e287 */
+ 4.68749999999999978700749928325717352E-02Q, /* 3ffa7ffffffffffffb16b6d5479e3000 */
+ -1.06208165308448830117773486334902917E-32Q, /* bf94b92be4b3b5b5a596a0a5187cc955 */
+ 5.07812499999999815072625435955786253E-02Q, /* 3ffa9fffffffffffd55bd086d5cbc000 */
+ -9.37038897148383660401929567549111394E-33Q, /* bf94853b111b0175b491c80d00419416 */
+ 5.46874999999999809511553152189867394E-02Q, /* 3ffabfffffffffffd4138bfa74a61000 */
+ 1.06642963074562437340498606682822123E-32Q, /* 3f94bafa3fe991b39255d563dfa05d89 */
+ 5.85937500000000184331996330905145551E-02Q, /* 3ffae000000000002a810a5f2f8bf000 */
+ -1.76639977694797200820296641773791945E-34Q, /* bf8ed596f07ce4408f1705c8ec16864c */
+ 6.25000000000000021544696744852045001E-02Q, /* 3ffb000000000000027be32045e2b000 */
+ 1.68616371995798354366633034788947149E-32Q, /* 3f955e33d7440794d8a1b25233d086ab */
+ 6.64062499999999965563110718495802889E-02Q, /* 3ffb0ffffffffffffc079a38a3fed000 */
+ -1.82463217667830160048872113565316215E-32Q, /* bf957af6163bcdb97cefab44a942482a */
+ 7.03124999999999759989183341261898222E-02Q, /* 3ffb1fffffffffffe454218acea05000 */
+ -1.07843770101525495515646940862541503E-32Q, /* bf94bff72aada26d94e76e71c07e0580 */
+ 7.42187499999999898968873730710101412E-02Q, /* 3ffb2ffffffffffff45a166496dc1000 */
+ 1.28629441689592874462780757154138223E-32Q, /* 3f950b2724597b8b93ce1e9d1cf4d035 */
+ 7.81249999999999957198938523510804668E-02Q, /* 3ffb3ffffffffffffb10bc52adbc5000 */
+ 1.13297573459968118467100063135856856E-33Q, /* 3f91787eea895b3c245899cf34ad0abd */
+ 8.20312500000000199911640621145851159E-02Q, /* 3ffb500000000000170c59a661a89000 */
+ -1.51161335208135146756554123073528707E-32Q, /* bf9539f326c5ca84e7db5401566f3775 */
+ 8.59375000000000134175373433347670743E-02Q, /* 3ffb6000000000000f78287547af0000 */
+ 1.09763629458404270323909815379924900E-32Q, /* 3f94c7f0b61b6e3e27d44b9f5bbc7e9d */
+ 8.98437500000000036533922600308306335E-02Q, /* 3ffb70000000000004364a83b7a14000 */
+ 3.11459653680110433194288029777718358E-33Q, /* 3f9302c0248136d65cebeab69488d949 */
+ 9.37500000000000184977946245216914691E-02Q, /* 3ffb800000000000155395d870b17000 */
+ -4.66656154468277949130395786965043927E-33Q, /* bf9383aec9b993b6db492b1ede786d8a */
+ 9.76562500000000237839723100419376084E-02Q, /* 3ffb9000000000001b6bca237f6c4000 */
+ -1.03028043424658760249140747856831301E-32Q, /* bf94abf6352e3d2bb398e47919a343fb */
+ 1.01562500000000012345545575236836572E-01Q, /* 3ffba000000000000e3bc30cd9a1f000 */
+ 2.15755372310795701322789783729456319E-32Q, /* 3f95c01b3b819edd9d07548fafd61550 */
+ 1.05468749999999976493840484471911438E-01Q, /* 3ffbafffffffffffe4e634cd77985000 */
+ 1.78771847038773333029677216592309083E-32Q, /* 3f95734b6ae650f33dd43c49a1df9fc0 */
+ 1.09375000000000002267015055992785402E-01Q, /* 3ffbc00000000000029d1ad08de7b000 */
+ 6.23263106693943817730045115112427717E-33Q, /* 3f9402e4b39ce2198a45e1d045868cd6 */
+ 1.13281250000000022354208618429577398E-01Q, /* 3ffbd0000000000019c5cc3f9d2b5000 */
+ 5.40514416644786448581426756221178868E-33Q, /* 3f93c10ab4021472c662f69435de9269 */
+ 1.17187500000000013252367133076817603E-01Q, /* 3ffbe000000000000f47688cc561b000 */
+ -7.12412585457324989451327215568641325E-33Q, /* bf9427ecb343a8d1758990565fcfbf45 */
+ 1.21093750000000020759863992944300792E-01Q, /* 3ffbf0000000000017ef3af97bf04000 */
+ 6.26591408357572503875647872077266444E-33Q, /* 3f940446a09a2da771b45fc075514d12 */
+ 1.25000000000000004739659392396765618E-01Q, /* 3ffc00000000000002bb7344ecd89000 */
+ -1.55611398459729463981000080101758830E-32Q, /* bf95433135febefa9e6aa4db39e263d2 */
+ 1.28906249999999982360888081057894783E-01Q, /* 3ffc07fffffffffff5d4ed3154361000 */
+ -1.77531518652835570781208599686606474E-32Q, /* bf9570b7f225ea076f97f418d11359c1 */
+ 1.32812500000000010568583998727400436E-01Q, /* 3ffc1000000000000617a5d09526a000 */
+ 2.12104021624990594668286391598300893E-32Q, /* 3f95b885d767a1048d93055927a27adc */
+ 1.36718749999999998434125157367005292E-01Q, /* 3ffc17ffffffffffff18eaebc7970000 */
+ 2.50454798592543203967309921276955297E-32Q, /* 3f9604164e5598528a76faff26cd1c97 */
+ 1.40625000000000015550032422969330356E-01Q, /* 3ffc20000000000008f6c79d8928c000 */
+ 7.80972982879849783680252962992639832E-33Q, /* 3f9444674acf2b3225c7647e0d95edf3 */
+ 1.44531250000000012402535562111122522E-01Q, /* 3ffc28000000000007264a8bc1ff1000 */
+ 2.79662468716455159585514763921671876E-32Q, /* 3f96226b095bd78aa650faf95a221993 */
+ 1.48437500000000007761020440087419948E-01Q, /* 3ffc3000000000000479530ff8fe3000 */
+ 2.15518492972728435680556239996258527E-32Q, /* 3f95bf9d49295e73a957906a029768cb */
+ 1.52343750000000001733189947520484032E-01Q, /* 3ffc38000000000000ffc6109f71f000 */
+ 8.34032236093545825619420380704500188E-33Q, /* 3f945a71851226a1d0ce5e656693153e */
+ 1.56249999999999988073295321246958484E-01Q, /* 3ffc3ffffffffffff91fedd62ae0f000 */
+ 2.44119337150624789345260194989620908E-32Q, /* 3f95fb041a57bc1c1280680ac1620bea */
+ 1.60156250000000002076894210913572460E-01Q, /* 3ffc48000000000001327ed84a199000 */
+ -7.36124501128859978061216696286151753E-33Q, /* bf9431c62f01e59d2c1e00f195a0037f */
+ 1.64062500000000000950861276373482172E-01Q, /* 3ffc500000000000008c5285fba85000 */
+ -4.80566184447001164583855800470217373E-33Q, /* bf938f3d1fcafd390f22f80e6c19421f */
+ 1.67968749999999989878071706155265999E-01Q, /* 3ffc57fffffffffffa2a445c548c5000 */
+ -4.42154428718618459799673088733365064E-32Q, /* bf96cb28cf1c1b28006d53ffe633b22a */
+ 1.71874999999999999459734108403218175E-01Q, /* 3ffc5fffffffffffffb04554e9dd4000 */
+ -3.29736288190321377985697972236270628E-32Q, /* bf96566af0ebc852e84be12859b24a31 */
+ 1.75781249999999997987525759778901845E-01Q, /* 3ffc67fffffffffffed702df6ffff000 */
+ -1.28800728638468399687523924685844352E-32Q, /* bf950b8236b88ca0c1b739dc91a7e3fc */
+ 1.79687500000000004929565820437175783E-01Q, /* 3ffc70000000000002d779bb32d2e000 */
+ 1.60624461317978482424582320675174225E-32Q, /* 3f954d9a9cc0c963fd081f3dc922d04e */
+ 1.83593750000000016873727045739708856E-01Q, /* 3ffc78000000000009ba1f6263c9a000 */
+ -3.83390389582056606880506003118452558E-32Q, /* bf968e22a5d826f77f19ee788474df22 */
+ 1.87500000000000013443068740761666872E-01Q, /* 3ffc80000000000007bfd8c72a1bf000 */
+ -2.74141662712926256150154726565203091E-32Q, /* bf961caf5ac59c7f941f928e324c2cc1 */
+ 1.91406249999999981494101786848611970E-01Q, /* 3ffc87fffffffffff55502eeae001000 */
+ 3.68992437075565165346469517256118001E-32Q, /* 3f967f2f03f9096793372a27b92ad79d */
+ 1.95312499999999989069921848800501648E-01Q, /* 3ffc8ffffffffffff9b3015280394000 */
+ 3.69712249337856518452988332367785220E-32Q, /* 3f967fee5fdb5bd501ff93516999faa0 */
+ 1.99218750000000021148042946919300804E-01Q, /* 3ffc9800000000000c30e67939095000 */
+ 2.50142536781142175091322844848566649E-32Q, /* 3f9603c34ae58e10b300b07137ee618a */
+ 2.03124999999999977732559198825437141E-01Q, /* 3ffc9ffffffffffff329e7df079e4000 */
+ -2.41951877287895024779300892731537816E-32Q, /* bf95f683aefe6965f080df8f59dd34a1 */
+ 2.07031249999999996744030653771913124E-01Q, /* 3ffca7fffffffffffe1f80f4b73ca000 */
+ -1.94346475904454000031592792989765585E-32Q, /* bf9593a44f87870a3d100d498501ecc7 */
+ 2.10937500000000000251399259834392298E-01Q, /* 3ffcb000000000000025199873310000 */
+ -1.33528748788094249098998693871759411E-33Q, /* bf91bbb9b25c813668d6103d08acac35 */
+ 2.14843749999999993936323609611875097E-01Q, /* 3ffcb7fffffffffffc8128c866236000 */
+ 1.14839877977014974625242788556545292E-32Q, /* 3f94dd06b4655c9b83a1305b240e7a42 */
+ 2.18750000000000015181732784749663837E-01Q, /* 3ffcc0000000000008c06da5fff24000 */
+ 1.42689085313142539755499441881408391E-32Q, /* 3f95285a87dfa7ea7dad5b3be8c669f4 */
+ 2.22656249999999992172647770539596569E-01Q, /* 3ffcc7fffffffffffb7ce2fe531f6000 */
+ -3.34421462850496887359128610229650547E-32Q, /* bf965b487962b5c2d9056ca6ac0c2e5c */
+ 2.26562499999999989595607223847082419E-01Q, /* 3ffccffffffffffffa0095277be5c000 */
+ -3.08983588107248752517344356508205569E-32Q, /* bf9640dded57157f8eded311213bdbcd */
+ 2.30468749999999979130462438434567117E-01Q, /* 3ffcd7fffffffffff3f8332996560000 */
+ -3.01407539802851697849105682795217019E-32Q, /* bf9638ffde35dbdfe1a1ffe45185de5d */
+ 2.34375000000000012194252337217891971E-01Q, /* 3ffce0000000000007078dd402c86000 */
+ -8.46879710915628592284714319904522657E-33Q, /* bf945fc7b29a2ac6c9eff9eb258a510f */
+ 2.38281249999999982991877076137149870E-01Q, /* 3ffce7fffffffffff6320b486eece000 */
+ -2.93563878880439245627127095245798544E-32Q, /* bf9630daaa4f40ff05caf29ace2ea7d4 */
+ 2.42187499999999981447559841442773990E-01Q, /* 3ffceffffffffffff54e24a09a8d5000 */
+ -4.56766746558806021264215486909850481E-32Q, /* bf96da556dee11f3113e5a3467b908e6 */
+ 2.46093749999999991067720539980207318E-01Q, /* 3ffcf7fffffffffffad9d405dcb5d000 */
+ 2.14033004219908074003010247652128251E-32Q, /* 3f95bc8776e8f9ae098884aa664cc3df */
+ 2.50000000000000016613825838126835953E-01Q, /* 3ffd00000000000004c9e24c12bb3000 */
+ 2.57617532593749185996714235009382870E-32Q, /* 3f960b867cc01178c0ec68226c6cb47d */
+ 2.53906250000000013372004437827044321E-01Q, /* 3ffd04000000000003daae05b3168000 */
+ 7.20177123439204414298152646284640101E-32Q, /* 3f9775eff59ddad7e7530b83934af87f */
+ 2.57812499999999995765234725413886085E-01Q, /* 3ffd07fffffffffffec7878bad9d5000 */
+ 6.51253187532920882777046064603770602E-32Q, /* 3f975226659ca241402e71c2011583b0 */
+ 2.61718750000000007647689994011222248E-01Q, /* 3ffd0c000000000002344cc793a0f000 */
+ 3.02370610028725823590045201871491395E-32Q, /* 3f9639ffe55fa2fa011674448b4e5b96 */
+ 2.65624999999999986893899042596554269E-01Q, /* 3ffd0ffffffffffffc38f0c0a1e9f000 */
+ -2.07683715950724761146070082510569258E-32Q, /* bf95af579a92e872fef81abfdf06bae8 */
+ 2.69531249999999979842788204900639327E-01Q, /* 3ffd13fffffffffffa30a908d67db000 */
+ 8.71465252506557329027658736641075706E-32Q, /* 3f97c47d99e19830447a42b1c0ffac61 */
+ 2.73437500000000006712165837793818271E-01Q, /* 3ffd18000000000001ef453a58edb000 */
+ -6.62704045767568912140550474455810301E-32Q, /* bf9758187a204dcb06ece46588aeeaba */
+ 2.77343749999999994411329302988535617E-01Q, /* 3ffd1bfffffffffffe63a0fec9c9e000 */
+ -4.87273466291944117406493607771338767E-32Q, /* bf96fa0381b0844a0be46bac2d673f0c */
+ 2.81250000000000012677892447379453135E-01Q, /* 3ffd20000000000003a7769e125d6000 */
+ -8.55871796664700790726282049552906783E-32Q, /* bf97bc64e01332cf7616b0091b8dff2c */
+ 2.85156249999999998558643013736363981E-01Q, /* 3ffd23ffffffffffff95a5894bccf000 */
+ -1.33068334720606220176455289635046875E-32Q, /* bf95145f43290ecf5b7adcb24697bc73 */
+ 2.89062500000000008831431235621753924E-01Q, /* 3ffd280000000000028ba504fac59000 */
+ -9.34157398616814623985483776710704237E-32Q, /* bf97e50ad1115b941fcb5f0c88a428f7 */
+ 2.92968750000000019840235286110877063E-01Q, /* 3ffd2c000000000005b7f372d184f000 */
+ 4.99302093775173155906059132992249671E-33Q, /* 3f939ecdcfb97bad3f8dbec5df5ec67d */
+ 2.96875000000000015867911730971630513E-01Q, /* 3ffd3000000000000492d860c79db000 */
+ 7.86107787827057767235127454590866211E-33Q, /* 3f944689517ee8f16cdb97d6a6938f32 */
+ 3.00781250000000015814100002286124758E-01Q, /* 3ffd340000000000048edfe73a17d000 */
+ -1.65419431293024229981937172317171504E-32Q, /* bf9557900e3efca16c89646b57f68dc0 */
+ 3.04687499999999985213157159965287195E-01Q, /* 3ffd37fffffffffffbbcec6f99b36000 */
+ 9.68753602893894024018934325652944198E-32Q, /* 3f97f70170e5458660c33a7e8d43d049 */
+ 3.08593749999999989969324338045156215E-01Q, /* 3ffd3bfffffffffffd1bdde4d0fb1000 */
+ 7.10268609610294706092252562643261106E-32Q, /* 3f9770cae45cdf615010401a4b37d8d4 */
+ 3.12500000000000002971606591018488854E-01Q, /* 3ffd40000000000000db440fbc06b000 */
+ 6.38924218802905979887732294952782964E-32Q, /* 3f974bbf988bb5622bd8fbaa46e8b811 */
+ 3.16406250000000006594921047402056305E-01Q, /* 3ffd44000000000001e69e8954814000 */
+ 3.96079878754651470094149874444850097E-32Q, /* 3f969b5017b9fa7a1e86975258c73d3d */
+ 3.20312500000000006713799366908329147E-01Q, /* 3ffd48000000000001ef64159c065000 */
+ -1.86401314975634286055150437995880517E-32Q, /* bf958323f0434911794e5fb8bfe136ba */
+ 3.24218749999999987061246567584951210E-01Q, /* 3ffd4bfffffffffffc4549db9b928000 */
+ -3.18643523744758601387071062700407431E-32Q, /* bf964ae5fa7e26c2c3981bed12e14372 */
+ 3.28124999999999991782776266707412953E-01Q, /* 3ffd4ffffffffffffda1ad0840ca8000 */
+ -4.46964199751314296839915534813144652E-32Q, /* bf96d0277729ffd74727150df6d15547 */
+ 3.32031250000000000393816557756032682E-01Q, /* 3ffd540000000000001d0efc04fad000 */
+ -9.03246333902065439930373230002688649E-33Q, /* bf947731a008748cc6dee948839ef7ae */
+ 3.35937499999999983810482995064392173E-01Q, /* 3ffd57fffffffffffb556cab8ae61000 */
+ 5.27742727066129518825981597650621794E-32Q, /* 3f9712050a6ddbf1cabf1b971f4b5d0b */
+ 3.39843750000000004310441349760912471E-01Q, /* 3ffd5c0000000000013e0def5ddc4000 */
+ -3.85927263474732591932884416445586106E-32Q, /* bf9690c51088ef3db9ca000829c450c2 */
+ 3.43749999999999990248130003997484364E-01Q, /* 3ffd5ffffffffffffd3070624a0af000 */
+ 9.62005170171527308106468341512327487E-34Q, /* 3f913fae595cea84432eb01430817fca */
+ 3.47656250000000004085726414568625697E-01Q, /* 3ffd640000000000012d79309e291000 */
+ -6.59664093705705297250259434519072507E-32Q, /* bf97568465eafb0e662e64a5dbfaf35f */
+
+ -1.98364257812501251077851763965418372E-03Q, /* bff6040000000001cd90f658cf0b1000 */
+ -3.71984513103117734260309047540278737E-34Q, /* bf8fee73c54483194782aac4a6154d11 */
+ -1.95312500000000378520649630233891879E-03Q, /* bff60000000000008ba643bb5e2e8000 */
+ -1.12194202736719050440745599339855038E-34Q, /* bf8e2a436aeff7bc529873354f47a3f5 */
+ -1.92260742187499397430259771221991482E-03Q, /* bff5f7fffffffffe4361cb51170da000 */
+ -2.30068299876822157331268484824540848E-34Q, /* bf8f31d02f85cfe8c0cc02276ce0f437 */
+ -1.89208984375001137424603270262074989E-03Q, /* bff5f0000000000347456ed490c23000 */
+ -1.15012507244426243338260435466985403E-34Q, /* bf8e31c174d5677a937a34ad8d2a70b4 */
+ -1.86157226562500172319250342061336738E-03Q, /* bff5e800000000007f262fa3617b4000 */
+ -3.12438344643346437509767736937785561E-34Q, /* bf8f9f4d426a2457c273d34ef7d9bde9 */
+ -1.83105468749999505256246872355430379E-03Q, /* bff5dffffffffffe92f18c1c2b6fa000 */
+ -5.91130415288336591179087455220308942E-35Q, /* bf8d3a4c80b42dc036bae446c9807f78 */
+ -1.80053710937499445182387245573120522E-03Q, /* bff5d7fffffffffe669dea82b4a4c000 */
+ -1.92396289352411531324908916321392100E-34Q, /* bf8eff7a2123fb573ba9778550d669bd */
+ -1.77001953125000387737631542516323906E-03Q, /* bff5d000000000011e19915c3ddb7000 */
+ 7.91101758977203355387806553469731354E-36Q, /* 3f8a507f5a70faaccf469e3461873dea */
+ -1.73950195312500034854670281415554486E-03Q, /* bff5c8000000000019b7dc6ef97bd000 */
+ 1.55906551582436824067407021178835755E-34Q, /* 3f8e9e7880333e34955aebcde3cfb053 */
+ -1.70898437499998955782591472611429852E-03Q, /* bff5bffffffffffcfd80e88aa6b96000 */
+ 8.22951661962611381718215899498500357E-35Q, /* 3f8db58e6031a779b59f6ece191de7cc */
+ -1.67846679687500586652037711131708544E-03Q, /* bff5b80000000001b0df6fd21c133000 */
+ -8.96642618848426299713145894522897419E-35Q, /* bf8ddcbcab46d531801bfae4121f2f8a */
+ -1.64794921875000109499161354039904782E-03Q, /* bff5b0000000000050cbce8915575000 */
+ -2.88077905394253859590587789680486639E-34Q, /* bf8f7eebd4dd860ef73b674d5e707959 */
+ -1.61743164062501133830507079150388351E-03Q, /* bff5a80000000003449e8700c3e82000 */
+ -3.68271725851639066312899986829350273E-34Q, /* bf8fe9845fe20a5fe74059e0cae185d6 */
+ -1.58691406249999015546015764131101956E-03Q, /* bff59ffffffffffd2999e668cdd28000 */
+ 8.48197657099957029953716507898788812E-35Q, /* 3f8dc2faaebb97392e451b07b28c4b12 */
+ -1.55639648437500317366570219290722587E-03Q, /* bff5980000000000ea2cd9a40d256000 */
+ -3.45156704719737676412949957712570373E-36Q, /* bf8925a079505516c8e317ac1ff53255 */
+ -1.52587890625000568759013197767046039E-03Q, /* bff5900000000001a3ab8a3f6b698000 */
+ -1.01902948542497496574967177677556729E-34Q, /* bf8e0ee78d94d9b5ad3d63ae35c9b554 */
+ -1.49536132812500945889014955936485340E-03Q, /* bff5880000000002b9f1621b57743000 */
+ -3.32264697086631598830366079048117140E-34Q, /* bf8fb9a7d14c32289204fbb0c9eb20e0 */
+ -1.46484374999999931883259902869504725E-03Q, /* bff57fffffffffffcdbd1c90e1b4a000 */
+ -1.76487524793892929381101031660811433E-34Q, /* bf8ed52f2f724bc1ae870b18356337b4 */
+ -1.43432617187498876325946983333888768E-03Q, /* bff577fffffffffcc2dff8faa5570000 */
+ -3.54550084538495708816233114576143814E-34Q, /* bf8fd74724576915868c1e8ce9f430f1 */
+ -1.40380859374999215367421282192718062E-03Q, /* bff56ffffffffffdbd0b18aac65ed000 */
+ -1.90585907028351204486765167064669639E-34Q, /* bf8efaaa0c0e23e50c11b2120348054f */
+ -1.37329101562499692341771212945644892E-03Q, /* bff567ffffffffff1cfd00f1b0577000 */
+ -3.59631150411372589637918252836880320E-34Q, /* bf8fde08239ac74942a46298ea4fb715 */
+ -1.34277343749999137467356674296739172E-03Q, /* bff55ffffffffffd839030b05d53d000 */
+ -1.49571076125940368185068762485268117E-35Q, /* bf8b3e1a3d5c684b27a9f835b1d8d3c9 */
+ -1.31225585937499247038404301859788734E-03Q, /* bff557fffffffffdd469936e691e3000 */
+ 3.10375845385355395586146533282311300E-34Q, /* 3f8f9c8f6d63b7a4145716ffd92491fb */
+ -1.28173828124999024755581675764821898E-03Q, /* bff54ffffffffffd306589b0ab21d000 */
+ -1.98541096105909793397376077900810019E-34Q, /* bf8f07e808bbb1e35106c294ffbb9687 */
+ -1.25122070312500340204619591143332523E-03Q, /* bff5480000000000fb06d5f16ad2c000 */
+ 3.62884195935761446237911443317457521E-34Q, /* 3f8fe25b17d623178a386a6fa6c5afb2 */
+ -1.22070312499999591578388993012071279E-03Q, /* bff53ffffffffffed2a356c440074000 */
+ -2.96756662615653130862526710937493307E-35Q, /* bf8c3b90d8ff2a991e5bd16718fb0645 */
+ -1.19018554687498821966212632349422735E-03Q, /* bff537fffffffffc9ac3b585dda89000 */
+ 1.44659971891167323357060028901142644E-34Q, /* 3f8e809279ab249edf1dad9fe13fb0bf */
+ -1.15966796875000160938908064907298384E-03Q, /* bff530000000000076c0800db9639000 */
+ 2.50088010538742402346270685365928513E-34Q, /* 3f8f4c6c8a483b60201d30c1a83c3cb7 */
+ -1.12915039062500267151512523291939657E-03Q, /* bff5280000000000c51f7e7315137000 */
+ 7.56402096465615210500092443924888831E-35Q, /* 3f8d922c1e485d99aea2668ed32b55a6 */
+ -1.09863281249998665006360103291051571E-03Q, /* bff51ffffffffffc26f2d4c9ce2ba000 */
+ 1.43982174467233642713619821353592061E-34Q, /* 3f8e7ec530b3d92b6303bec1c81214d1 */
+ -1.06811523437500522742248711752028025E-03Q, /* bff518000000000181b7380f10446000 */
+ 5.41265133745862349181293024531133174E-35Q, /* 3f8d1fc9313d018b30e790e06b6be723 */
+ -1.03759765624999980942114138999770552E-03Q, /* bff50ffffffffffff1f01130490e1000 */
+ 1.21525139612685854366189534669623436E-34Q, /* 3f8e4311b96b6fcde412caf3f0d86fb9 */
+ -1.00708007812499602697537601515759439E-03Q, /* bff507fffffffffedad7afcce7051000 */
+ 1.00020246351201558505328236381833392E-34Q, /* 3f8e09e640992512b1300744a7e984ed */
+ -9.76562499999992592487302113340463694E-04Q, /* bff4fffffffffffbbad8151f8adf6000 */
+ -1.64984406575162932060422892046851002E-34Q, /* bf8eb69a919986e8054b86fc34300f24 */
+ -9.46044921874989085824996924138179594E-04Q, /* bff4effffffffff9b55a204fd9792000 */
+ -9.29539174108308550334255350011347171E-35Q, /* bf8dee3a50ed896b4656fa577a1df3d7 */
+ -9.15527343750013735214860599791540029E-04Q, /* bff4e00000000007eaf5bf103f82d000 */
+ 3.07557018309280519949818825519490586E-35Q, /* 3f8c470cfbef77d32c74cb8042f6ee81 */
+ -8.85009765625012292294986105781516428E-04Q, /* bff4d000000000071605c65403b97000 */
+ 4.77499983783821950338363358545463558E-35Q, /* 3f8cfbc3dc18884c4c4f9e07d90d7bd3 */
+ -8.54492187499986941239470706817188192E-04Q, /* bff4bffffffffff878ddf9cab264a000 */
+ -1.60128240346239526958630011447901568E-34Q, /* bf8ea9b1a21e19e2d5bd84b0fbffcf95 */
+ -8.23974609374996290174598690241743810E-04Q, /* bff4affffffffffddc86c249ebe06000 */
+ 1.61677540391961912631535763471935882E-34Q, /* 3f8eadd00841366b0dc2bc262c2c8c36 */
+ -7.93457031249988696952538334288757473E-04Q, /* bff49ffffffffff97bf6f0aa85a5f000 */
+ 1.22318577008381887076634753347515709E-34Q, /* 3f8e452db5b5d250878f71040da06d14 */
+ -7.62939453124996723316499040007097041E-04Q, /* bff48ffffffffffe1c7265b431108000 */
+ -1.03845161748762410745671891558398468E-34Q, /* bf8e14115ad884c96d1a820c73647220 */
+ -7.32421874999998242520117923997325794E-04Q, /* bff47ffffffffffefca4498b7aa8a000 */
+ 5.64005211953031009549514026639438083E-35Q, /* 3f8d2be06950f68f1a6d8ff829a6928e */
+ -7.01904296874999772890934814265622012E-04Q, /* bff46fffffffffffde7c0fe5d8041000 */
+ 5.90245467325173644235991233229525762E-35Q, /* 3f8d39d40cc49002189243c194b1db0e */
+ -6.71386718750008699269643939210658742E-04Q, /* bff460000000000503c91d798b60c000 */
+ -5.20515801723324452151498579012322191E-35Q, /* bf8d14c0f08a6a9285b32b8bda003eb5 */
+ -6.40869140625005499535275057463709988E-04Q, /* bff45000000000032b969184e9751000 */
+ -6.69469163285461870099846471658294534E-35Q, /* bf8d63f36bab7b24d936c9380e3d3fa6 */
+ -6.10351562499999293780097329596079841E-04Q, /* bff43fffffffffff97c7c433e35ed000 */
+ -1.16941808547394177991845382085515086E-34Q, /* bf8e36e27886f10b234a7dd8fc588bf0 */
+ -5.79833984375000068291972326409994795E-04Q, /* bff43000000000000a13ff6dcf2bf000 */
+ 1.17885044988246219185041488459766001E-34Q, /* 3f8e3964677e001a00412aab52790842 */
+ -5.49316406249990904622170867910987793E-04Q, /* bff41ffffffffffac1c25739c716b000 */
+ -3.31875702128137033065075734368960972E-35Q, /* bf8c60e928d8982c3c99aef4f885a121 */
+ -5.18798828125011293653756992177727236E-04Q, /* bff410000000000682a62cff36775000 */
+ -5.69971237642088463334239430962628187E-35Q, /* bf8d2f0c76f8757d61cd1abc7ea7d066 */
+ -4.88281249999990512232251384917893121E-04Q, /* bff3fffffffffff50fb48992320df000 */
+ 1.02144616714408655325510171265051108E-35Q, /* 3f8ab279a3626612710b9b3ac71734ac */
+ -4.57763671874997554564967307956493434E-04Q, /* bff3dffffffffffd2e3c272e3cca9000 */
+ -8.25484058867957231164162481843653503E-35Q, /* bf8db6e71158e7bf93e2e683f07aa841 */
+ -4.27246093749991203999790346349633286E-04Q, /* bff3bffffffffff5dbe103cba0eb2000 */
+ -3.51191203319375193921924105905691755E-35Q, /* bf8c757356d0f3dd7fbefc0dd419ab50 */
+ -3.96728515624986649402960638705483281E-04Q, /* bff39ffffffffff09b996882706ec000 */
+ -5.51925962073095883016589497244931171E-36Q, /* bf89d586d49f22289cfc860bebb99056 */
+ -3.66210937499999945095511981300980754E-04Q, /* bff37fffffffffffefcb88bfc7df6000 */
+ -2.11696465278144529364423332249588595E-35Q, /* bf8bc23a84d28e5496c874ef9833be25 */
+ -3.35693359374992480958458008559640163E-04Q, /* bff35ffffffffff754c548a8798f2000 */
+ -8.58941791799705081104736787493668352E-35Q, /* bf8dc8b1192fb7c3662826d43acb7c68 */
+ -3.05175781250009811036303273640122156E-04Q, /* bff340000000000b4fb4f1aad1c76000 */
+ -8.61173897858769926480551302277426632E-35Q, /* bf8dc9e0eabb1c0b33051011b64769fa */
+ -2.74658203124987298321920308390303850E-04Q, /* bff31ffffffffff15b2056ac252fd000 */
+ 3.35152809454778381053519808988046631E-37Q, /* 3f85c82fb59ff8d7c80d44e635420ab1 */
+ -2.44140624999999992770514819575735516E-04Q, /* bff2fffffffffffffbbb82d6a7636000 */
+ 3.54445837111124472730013879165516908E-35Q, /* 3f8c78e955b01378be647b1c92aa9a77 */
+ -2.13623046875012756463165168672749438E-04Q, /* bff2c0000000001d6a1635fea6bbf000 */
+ 1.50050816288650121729916777279129473E-35Q, /* 3f8b3f1f6f616a61129a58e131cbd31d */
+ -1.83105468749991323078784464300306893E-04Q, /* bff27fffffffffebfe0cbd0c82399000 */
+ -9.14919506501448661140572099029756008E-37Q, /* bf873754bacaa9d9513b6127e791eb47 */
+ -1.52587890625013337032336300236461546E-04Q, /* bff240000000001ec0cb57f2cc995000 */
+ 2.84906084373176180870418394956384516E-35Q, /* 3f8c2ef6d03a7e6ab087c4f099e4de89 */
+ -1.22070312499990746786116828458007518E-04Q, /* bff1ffffffffffd553bbb49f35a34000 */
+ 6.71618008964968339584520728412444537E-36Q, /* 3f8a1dacb99c60071fc9cd2349495bf0 */
+ -9.15527343750029275602791047595142231E-05Q, /* bff180000000000d8040cd6ecde28000 */
+ -1.95753652091078750312541716951402172E-35Q, /* bf8ba0526cfb24d8d59122f1c7a09a14 */
+ -6.10351562499913258461494008080572701E-05Q, /* bff0ffffffffffaffebbb92d7f6a9000 */
+ 5.69868489273961111703398456218119973E-36Q, /* 3f89e4ca5df09ef4a4386dd5b3bf0331 */
+ -3.05175781250092882818419203884960853E-05Q, /* bff0000000000055ab55de88fac1d000 */
+ 9.03341100018476837609128961872915953E-36Q, /* 3f8a803d229fa3a0e834a63abb06662b */
+#define T_EXPL_ARG2 (2*T_EXPL_ARG1 + 2 + 2*65)
+ 0.00000000000000000000000000000000000E+00Q, /* 00000000000000000000000000000000 */
+ 0.00000000000000000000000000000000000E+00Q, /* 00000000000000000000000000000000 */
+ 3.05175781249814607084128277672749162E-05Q, /* 3feffffffffffeaa02abb9102f499000 */
+ 1.00271855391179733380665816525889949E-36Q, /* 3f8755351afa042ac3f58114824d4c10 */
+ 6.10351562500179243748093427073421439E-05Q, /* 3ff1000000000052a95de07a4c26d000 */
+ 1.67231624299180373502350811501181670E-36Q, /* 3f881c87a53691cae9d77f4e40d66616 */
+ 9.15527343749970728685313252158399200E-05Q, /* 3ff17ffffffffff28040cc2acde28000 */
+ 2.43665747834893104318707597514407880E-36Q, /* 3f889e9366c7c6c6a2ecb78dc9b0509e */
+ 1.22070312500027751961838150070880064E-04Q, /* 3ff200000000003ffddde6c153b53000 */
+ -1.73322146370624186623546452226755405E-35Q, /* bf8b709d8d658ed5dbbe943de56ee84e */
+ 1.52587890624995916105682628143179430E-04Q, /* 3ff23ffffffffff6954b56e285d23000 */
+ 1.23580432650945898349135528000443828E-35Q, /* 3f8b06d396601dde16de7d7bc27346e6 */
+ 1.83105468750008670314358488289621794E-04Q, /* 3ff2800000000013fe0cdc8c823b7000 */
+ 4.30446229148833293310207915930740796E-35Q, /* 3f8cc9ba9bfe554a4f7f2fece291eb23 */
+ 2.13623046875005741337455947623248132E-04Q, /* 3ff2c0000000000d3d1662de21a3f000 */
+ -3.96110759869520786681660669615255057E-35Q, /* bf8ca5379b04ff4a31aab0ceacc917e6 */
+ 2.44140624999981493573336463433440506E-04Q, /* 3ff2ffffffffffd553bbdf48e0534000 */
+ -1.39617373942387888957350179316792928E-35Q, /* bf8b28eeedc286015802b63f96b8c5cd */
+ 2.74658203124984920706309918754626834E-04Q, /* 3ff31fffffffffee9d60c8439ec1d000 */
+ -3.16168080483901830349738314447356223E-36Q, /* bf890cf74f81c77a611abc1243812444 */
+ 3.05175781250008648918265055410966055E-04Q, /* 3ff3400000000009f8b5c9a346636000 */
+ 8.54421306185008998867856704677221443E-35Q, /* 3f8dc649cd40922fc08adc6b6b20ead0 */
+ 3.35693359374988945462612499316774515E-04Q, /* 3ff35ffffffffff34146c540f15b2000 */
+ 7.96443137431639500475160850431097078E-35Q, /* 3f8da77638ed3148fc4d99d1c9e13446 */
+ 3.66210937500027690542093987739604535E-04Q, /* 3ff380000000001fecce34bea89c4000 */
+ 2.14507323877752361258862577769090367E-35Q, /* 3f8bc834e554d38894cf91957b0253d3 */
+ 3.96728515625003928083564943615052121E-04Q, /* 3ff3a00000000004875d9a4acf6ab000 */
+ 4.88358523466632050664019922448605508E-35Q, /* 3f8d03a7eaeef1a9f78c71a12c44dd28 */
+ 4.27246093750017799227172345607351585E-04Q, /* 3ff3c00000000014856794c3ee850000 */
+ 6.66520494592631402182216588784828935E-35Q, /* 3f8d6262118fcdb59b8f16108f5f1a6c */
+ 4.57763671875002108342364320152138181E-04Q, /* 3ff3e000000000026e45d855410b9000 */
+ 7.21799615960261390920033272189522298E-35Q, /* 3f8d7fc645cff8879462296af975c9fd */
+ 4.88281249999999768797631616370963356E-04Q, /* 3ff3ffffffffffffbbc2d7cc004df000 */
+ -5.30564629906905979452258114088325361E-35Q, /* bf8d1a18b71929a30d67a217a27ae851 */
+ 5.18798828124997339054881383202487041E-04Q, /* 3ff40ffffffffffe775055eea5851000 */
+ -4.03682911253647925867848180522846377E-35Q, /* bf8cad44f0f3e5199d8a589d9332acad */
+ 5.49316406249980511907933706754958501E-04Q, /* 3ff41ffffffffff4c410b29bb62fb000 */
+ -2.08166843948323917121806956728438051E-35Q, /* bf8bbab8cf691403249fe5b699e25143 */
+ 5.79833984374989593561576568548497165E-04Q, /* 3ff42ffffffffffa0047df328d817000 */
+ -1.72745033420153042445343706432627539E-34Q, /* bf8ecb3c2d7d3a9e6e960576be901fdf */
+ 6.10351562500008540711511259540838154E-04Q, /* 3ff4400000000004ec62f54f8c271000 */
+ 7.41889382604319545724663095428976499E-35Q, /* 3f8d8a74c002c81a47c93b8e05d15f8e */
+ 6.40869140625020444702875407535884986E-04Q, /* 3ff450000000000bc91b09718515d000 */
+ -4.47321009727305792048065440180490107E-35Q, /* bf8cdbac5c8fe70822081d8993eb5cb6 */
+ 6.71386718750007531635964622352684074E-04Q, /* 3ff460000000000457792973db05c000 */
+ 5.13698959677949336513874456684462092E-35Q, /* 3f8d112114436949c5ef38d8049004ab */
+ 7.01904296875006634673332887754430334E-04Q, /* 3ff4700000000003d31adf2cb8b1d000 */
+ -8.25665755717729437292989870760751482E-35Q, /* bf8db6ffcc8ef71f8e648e3a8b160f5a */
+ 7.32421874999998244664170215504673504E-04Q, /* 3ff47ffffffffffefcf5498bd5c8a000 */
+ -5.64005234937832153139057628112753364E-35Q, /* bf8d2be06a1dfe90e7bf90fba7c12a98 */
+ 7.62939453125017456345986752604096408E-04Q, /* 3ff490000000000a101a1b093d4a8000 */
+ -1.11084094120417622468550608896588329E-34Q, /* bf8e274feabd2d94f6694507a46accb1 */
+ 7.93457031249987558617598988993908016E-04Q, /* 3ff49ffffffffff8d3f9dcab74bbf000 */
+ -1.22966480225449015129079129940978828E-34Q, /* bf8e46e6a65eef8fa9e42eddf3da305e */
+ 8.23974609374997378723747633335135819E-04Q, /* 3ff4affffffffffe7d2afbaa55b26000 */
+ -1.62270010016794279091906973366704963E-34Q, /* bf8eaf633f057ebdb664a34566401c4e */
+ 8.54492187500023938282350821569920958E-04Q, /* 3ff4c0000000000dccaabce399e59000 */
+ -1.39076361712838158775374263169606160E-34Q, /* bf8e71ba779364b3bbdba7841f2c4ca1 */
+ 8.85009765624987932362186815286691297E-04Q, /* 3ff4cffffffffff90b218886edc2a000 */
+ 4.07328275060905585228261577392403980E-35Q, /* 3f8cb1254dbb6ea4b8cfa5ed4cf28d24 */
+ 9.15527343749975579461305518559161974E-04Q, /* 3ff4dffffffffff1ec2a21f25df33000 */
+ 1.16855112459192484947855553716334015E-35Q, /* 3f8af10bf319e9f5270cf249eeffbe5c */
+ 9.46044921875016761584725882821122521E-04Q, /* 3ff4f00000000009a992c46c16d71000 */
+ 9.51660680007524262741115611071680436E-35Q, /* 3f8df9fd56e81f8edf133843910ee831 */
+ 9.76562499999974118878133088548272636E-04Q, /* 3ff4fffffffffff1149edc46a6df6000 */
+ -5.65271128977550656964071208289181661E-36Q, /* bf89e0e12689dd721aa2314c81eb6429 */
+ 1.00708007812498671732140389760347830E-03Q, /* 3ff507fffffffffc2be94b90ed091000 */
+ -1.43355074891483635310132767255371379E-34Q, /* bf8e7d1a688c247b16022daab1316d55 */
+ 1.03759765625002637786192745235343007E-03Q, /* 3ff51000000000079a57b966bc158000 */
+ 2.95905815240957629366749917020106928E-34Q, /* 3f8f895387fc73bb38f8a1b254c01a60 */
+ 1.06811523437500860568717813047520763E-03Q, /* 3ff51800000000027afcd5b35f5e6000 */
+ -5.98328495358586628195372356742878314E-35Q, /* bf8d3e204130013bf6328f1b70ff8c76 */
+ 1.09863281250001439958487251556220070E-03Q, /* 3ff5200000000004268077c6c66bd000 */
+ 2.41371837889426603334113000868144760E-34Q, /* 3f8f40d6948edf864054ccf151f9815e */
+ 1.12915039062501298413451613770002366E-03Q, /* 3ff5280000000003be0f5dd8fe81b000 */
+ -1.28815268997394164973472617519705703E-34Q, /* bf8e567321172ea089dce4bc8354ecb7 */
+ 1.15966796874997272036339054191407232E-03Q, /* 3ff52ffffffffff8231e3bcfff1e8000 */
+ 1.02996064554316248496839462594377804E-34Q, /* 3f8e11cf7d402789244f68e2d4f985b1 */
+ 1.19018554687502744121802585360546796E-03Q, /* 3ff5380000000007e8cdf3f8f6c20000 */
+ -1.43453217726255628994625761307322163E-34Q, /* bf8e7d5d3370d85a374f5f4802fc517a */
+ 1.22070312499997743541996266398850614E-03Q, /* 3ff53ffffffffff97f0722561f454000 */
+ -1.41086259180534339713692694428211646E-34Q, /* bf8e77125519ff76244dfec5fbd58402 */
+ 1.25122070312501024092560690174507039E-03Q, /* 3ff5480000000002f3a59d8820691000 */
+ 3.84102646020099293168698506729765213E-34Q, /* 3f8ffe8f5b86f9c3569c8f26e19b1f50 */
+ 1.28173828124997986521442660131425390E-03Q, /* 3ff54ffffffffffa3250a764439d9000 */
+ 1.44644589735033114377952806106652650E-34Q, /* 3f8e808801b80dcf38323cdbfdca2549 */
+ 1.31225585937501665804856968749058137E-03Q, /* 3ff5580000000004cd25a414c6d62000 */
+ 1.67474574742200577294563576414361377E-34Q, /* 3f8ebd394a151dbda4f81d5d83c0f1e9 */
+ 1.34277343749997290265837386401818888E-03Q, /* 3ff55ffffffffff83091b042cfd59000 */
+ -1.55650565030381326742591837551559103E-34Q, /* bf8e9dca490d7fecfadba9625ffb91c5 */
+ 1.37329101562497720784949380297774268E-03Q, /* 3ff567fffffffff96e3c7312f5ccf000 */
+ 1.65279335325630026116581677369221748E-34Q, /* 3f8eb763496f5bd7404f2298b402074f */
+ 1.40380859374999099958354100336136647E-03Q, /* 3ff56ffffffffffd67e2f09f2a381000 */
+ 1.89919944388961890195706641264717076E-34Q, /* 3f8ef8e4d0ffdfeba982aa8829501389 */
+ 1.43432617187497484122173130998160625E-03Q, /* 3ff577fffffffff8bf9c1d71af8a8000 */
+ 2.57638517142061429772064578590009568E-34Q, /* 3f8f5675d82c1cc4ada70fd3a957b89a */
+ 1.46484374999999929342158925502052945E-03Q, /* 3ff57fffffffffffcbdd1c7671b46000 */
+ 1.76487201934184070490166772482073801E-34Q, /* 3f8ed52ef732458f6e4c5c07504f33cc */
+ 1.49536132812502318451070466256902933E-03Q, /* 3ff5880000000006aeb7066c8ad43000 */
+ 2.38068367275295804321313550609246656E-34Q, /* 3f8f3c7277ae6fc390ace5e06c0b025b */
+ 1.52587890625000448053340248672949543E-03Q, /* 3ff59000000000014a9ae2104b3bc000 */
+ 1.01174455568392813258454590274740959E-34Q, /* 3f8e0cf7c434762991bb38e12acee215 */
+ 1.55639648437501113499837053523090913E-03Q, /* 3ff5980000000003359e2c204355e000 */
+ -2.82398418808099749023517211651363693E-35Q, /* bf8c2c4c2971d88caa95e15fb1ccb1a1 */
+ 1.58691406249999937955142588308171026E-03Q, /* 3ff59fffffffffffd2380ecbc87c2000 */
+ -1.27361695572422741562701199136538047E-34Q, /* bf8e5295e0e206dfb0f0266c07225448 */
+ 1.61743164062498000531048954475329309E-03Q, /* 3ff5a7fffffffffa3ca6fe61ed94c000 */
+ -1.22606548862580061633942923016222044E-34Q, /* bf8e45f1b17bb61039d21a351bb207b8 */
+ 1.64794921875001835451453858682255576E-03Q, /* 3ff5b000000000054a52fa20f6565000 */
+ 1.39132339594152335892305491425264583E-34Q, /* 3f8e71e0904c5449b414ee49b191cef2 */
+ 1.67846679687501263995029340691547953E-03Q, /* 3ff5b80000000003a4a9e912c910b000 */
+ 6.67245854693585315412242764786197029E-35Q, /* 3f8d62c4ccac1e7511a617d469468ccd */
+ 1.70898437500002646861403514115369655E-03Q, /* 3ff5c00000000007a109fbaa7e015000 */
+ 6.87367172354719289559624829652240928E-36Q, /* 3f8a245fa835eceb42bae8128d9336db */
+ 1.73950195312501174308226096992992128E-03Q, /* 3ff5c80000000003627c8d637a005000 */
+ -2.20824271875474985927385878948759352E-34Q, /* bf8f25869b1cbefb25e735992f232f57 */
+ 1.77001953124997491747605207736194513E-03Q, /* 3ff5cffffffffff8c53c84b6883b8000 */
+ 3.43123048533596296514343180408963705E-34Q, /* 3f8fc816b91d173ddadbbf09b1287906 */
+ 1.80053710937497698911127570705069398E-03Q, /* 3ff5d7fffffffff95e1899f4a8430000 */
+ 3.99231237340890073475077494556136100E-35Q, /* 3f8ca889148f62fa854da5674df41279 */
+ 1.83105468750002267094899598630423914E-03Q, /* 3ff5e0000000000688d21e62ba674000 */
+ -3.22274595655810623999007524769365273E-34Q, /* bf8fac605cb9ae01eb719675ced25560 */
+ 1.86157226562500499224728040579690330E-03Q, /* 3ff5e80000000001705ce28a6d89e000 */
+ 3.07094985075881613489605622068441083E-34Q, /* 3f8f98330225ec7e2c8f3c0d1c432b91 */
+ 1.89208984374998234666824993196980949E-03Q, /* 3ff5effffffffffae969fdc7cd8cf000 */
+ -3.06287628722973914692165056776495733E-34Q, /* bf8f9720477d9cfa10e464df7f91020c */
+ 1.92260742187501225343755557292811682E-03Q, /* 3ff5f800000000038824e428ed49a000 */
+ 6.30049124729794620592961282769623368E-35Q, /* 3f8d4efdd7cd4336d88a6aa49e1e96bc */
+ 1.95312499999998514894032051116231258E-03Q, /* 3ff5fffffffffffbb82f6a04f1ae0000 */
+ -6.14610057507500948543216998736262902E-35Q, /* bf8d46c862d39255370e7974d48daa7e */
+ 1.98364257812501222021119324146882732E-03Q, /* 3ff6040000000001c2d8a1aa5188d000 */
+ 3.71942298418113774118754986159801984E-34Q, /* 3f8fee6567d9940495519ffe62cbc9a4 */
+
+ 7.06341639425619532977052017486130353E-01Q, /* 3ffe69a59c8245a9ac00000000000000 */
+ 7.09106182437398424589503065362805501E-01Q, /* 3ffe6b0ff72deb89d000000000000000 */
+ 7.11881545564596485142772053222870454E-01Q, /* 3ffe6c7bbce9a6d93000000000000000 */
+ 7.14667771155948150507697391731198877E-01Q, /* 3ffe6de8ef213d71e000000000000000 */
+ 7.17464901725936049503573599395167548E-01Q, /* 3ffe6f578f41e1a9e400000000000000 */
+ 7.20272979955439790478166628417966422E-01Q, /* 3ffe70c79eba33c06c00000000000000 */
+ 7.23092048692387218133958981525211129E-01Q, /* 3ffe72391efa434c7400000000000000 */
+ 7.25922150952408251622927082280511968E-01Q, /* 3ffe73ac117390acd800000000000000 */
+ 7.28763329919491220643124052003258839E-01Q, /* 3ffe752077990e79d000000000000000 */
+ 7.31615628946641782803794740175362676E-01Q, /* 3ffe769652df22f7e000000000000000 */
+ 7.34479091556544505525749855223693885E-01Q, /* 3ffe780da4bba98c4800000000000000 */
+ 7.37353761442226890432394270646909717E-01Q, /* 3ffe79866ea5f432d400000000000000 */
+ 7.40239682467726090031590047146892175E-01Q, /* 3ffe7b00b216ccf53000000000000000 */
+ 7.43136898668758316688354170764796436E-01Q, /* 3ffe7c7c70887763c000000000000000 */
+ 7.46045454253390638577059235103661194E-01Q, /* 3ffe7df9ab76b20fd000000000000000 */
+ 7.48965393602715662213498148958024103E-01Q, /* 3ffe7f78645eb8076400000000000000 */
+ 7.51896761271528629722027403659012634E-01Q, /* 3ffe80f89cbf42526400000000000000 */
+ 7.54839601989007347171423134568613023E-01Q, /* 3ffe827a561889716000000000000000 */
+ 7.57793960659394638668118204805068672E-01Q, /* 3ffe83fd91ec46ddc000000000000000 */
+ 7.60759882362683631518152083117456641E-01Q, /* 3ffe858251bdb68b8c00000000000000 */
+ 7.63737412355305483879774897104653064E-01Q, /* 3ffe87089711986c9400000000000000 */
+ 7.66726596070820082262642358728044201E-01Q, /* 3ffe8890636e31f54400000000000000 */
+ 7.69727479120609181517664865168626420E-01Q, /* 3ffe8a19b85b4fa2d800000000000000 */
+ 7.72740107294572486917871856348938309E-01Q, /* 3ffe8ba4976246833800000000000000 */
+ 7.75764526561826289752232810315035749E-01Q, /* 3ffe8d31020df5be4400000000000000 */
+ 7.78800783071404878477039801509818062E-01Q, /* 3ffe8ebef9eac820b000000000000000 */
+ 7.81848923152964780936002853195532225E-01Q, /* 3ffe904e8086b5a87800000000000000 */
+ 7.84908993317491698871180005880887620E-01Q, /* 3ffe91df97714512d800000000000000 */
+ 7.87981040258010162480317717381694820E-01Q, /* 3ffe9372403b8d6bcc00000000000000 */
+ 7.91065110850296016042904057030682452E-01Q, /* 3ffe95067c78379f2800000000000000 */
+ 7.94161252153591734614934694036492147E-01Q, /* 3ffe969c4dbb800b4800000000000000 */
+ 7.97269511411324433014513601847284008E-01Q, /* 3ffe9833b59b38154400000000000000 */
+ 8.00389936051826789142893403550260700E-01Q, /* 3ffe99ccb5aec7bec800000000000000 */
+ 8.03522573689060742863077280162542593E-01Q, /* 3ffe9b674f8f2f3d7c00000000000000 */
+ 8.06667472123343942680406826184480451E-01Q, /* 3ffe9d0384d70893f800000000000000 */
+ 8.09824679342079301047618855591281317E-01Q, /* 3ffe9ea15722892c7800000000000000 */
+ 8.12994243520486992160556383169023320E-01Q, /* 3ffea040c80f8374f000000000000000 */
+ 8.16176213022339780422953481320291758E-01Q, /* 3ffea1e1d93d687d0000000000000000 */
+ 8.19370636400700819157449927843117621E-01Q, /* 3ffea3848c4d49954c00000000000000 */
+ 8.22577562398664585696650419777142815E-01Q, /* 3ffea528e2e1d9f09800000000000000 */
+ 8.25797039950100647542896581398963463E-01Q, /* 3ffea6cede9f70467c00000000000000 */
+ 8.29029118180400342863478613253391813E-01Q, /* 3ffea876812c0877bc00000000000000 */
+ 8.32273846407226292054559735333896242E-01Q, /* 3ffeaa1fcc2f45343800000000000000 */
+ 8.35531274141265073440720811959181447E-01Q, /* 3ffeabcac15271a2a400000000000000 */
+ 8.38801451086982535754188461396552157E-01Q, /* 3ffead7762408309bc00000000000000 */
+ 8.42084427143382358016410194068157580E-01Q, /* 3ffeaf25b0a61a7b4c00000000000000 */
+ 8.45380252404767357221615498019673396E-01Q, /* 3ffeb0d5ae318680c400000000000000 */
+ 8.48688977161503960155997106085123960E-01Q, /* 3ffeb2875c92c4c99400000000000000 */
+ 8.52010651900789478530029441571969073E-01Q, /* 3ffeb43abd7b83db1c00000000000000 */
+ 8.55345327307422548246407245642330963E-01Q, /* 3ffeb5efd29f24c26400000000000000 */
+ 8.58693054264576483003423845730139874E-01Q, /* 3ffeb7a69db2bcc77800000000000000 */
+ 8.62053883854575708767242758767679334E-01Q, /* 3ffeb95f206d17228000000000000000 */
+ 8.65427867359675251357487013592617586E-01Q, /* 3ffebb195c86b6b29000000000000000 */
+ 8.68815056262843166123843730019871145E-01Q, /* 3ffebcd553b9d7b62000000000000000 */
+ 8.72215502248546159513864495238522068E-01Q, /* 3ffebe9307c271855000000000000000 */
+ 8.75629257203538208242932228131394368E-01Q, /* 3ffec0527a5e384ddc00000000000000 */
+ 8.79056373217652342599848225290770642E-01Q, /* 3ffec213ad4c9ed0d800000000000000 */
+ 8.82496902584595399599010079327854328E-01Q, /* 3ffec3d6a24ed8221800000000000000 */
+ 8.85950897802745995779361010136199184E-01Q, /* 3ffec59b5b27d9696800000000000000 */
+ 8.89418411575955636383383762222365476E-01Q, /* 3ffec761d99c5ba58800000000000000 */
+ 8.92899496814352794382685374330321793E-01Q, /* 3ffec92a1f72dd70d400000000000000 */
+ 8.96394206635150403439382671422208659E-01Q, /* 3ffecaf42e73a4c7d800000000000000 */
+ 8.99902594363456265202927397695020773E-01Q, /* 3ffeccc00868c0d18800000000000000 */
+ 9.03424713533086704009278378180169966E-01Q, /* 3ffece8daf1e0ba94c00000000000000 */
+ 9.06960617887383580004723171441582963E-01Q, /* 3ffed05d24612c2af000000000000000 */
+ 9.10510361380034133338412516422977205E-01Q, /* 3ffed22e6a0197c02c00000000000000 */
+ 9.14073998175894436579724811053893063E-01Q, /* 3ffed40181d094303400000000000000 */
+ 9.17651582651815816982221463149471674E-01Q, /* 3ffed5d66da13970f400000000000000 */
+ 9.21243169397474526149949269893113524E-01Q, /* 3ffed7ad2f48737a2000000000000000 */
+ 9.24848813216204823639543519675498828E-01Q, /* 3ffed985c89d041a3000000000000000 */
+ 9.28468569125835141431224428743007593E-01Q, /* 3ffedb603b7784cd1800000000000000 */
+ 9.32102492359527579068867453315760940E-01Q, /* 3ffedd3c89b26894e000000000000000 */
+ 9.35750638366620729469147477175283711E-01Q, /* 3ffedf1ab529fdd41c00000000000000 */
+ 9.39413062813475779888605643463961314E-01Q, /* 3ffee0fabfbc702a3c00000000000000 */
+ 9.43089821584325888048638830696290825E-01Q, /* 3ffee2dcab49ca51b400000000000000 */
+ 9.46780970782128888929563004239753354E-01Q, /* 3ffee4c079b3f8000400000000000000 */
+ 9.50486566729423443256052905780961737E-01Q, /* 3ffee6a62cdec7c7b000000000000000 */
+ 9.54206665969188322362626308859034907E-01Q, /* 3ffee88dc6afecfbfc00000000000000 */
+ 9.57941325265705301283958306157728657E-01Q, /* 3ffeea77490f0196b000000000000000 */
+ 9.61690601605425299247542625380447134E-01Q, /* 3ffeec62b5e5881fb000000000000000 */
+ 9.65454552197837823079851204965962097E-01Q, /* 3ffeee500f1eed967000000000000000 */
+ 9.69233234476344074348475032820715569E-01Q, /* 3ffef03f56a88b5d7800000000000000 */
+ 9.73026706099133165128733935489435680E-01Q, /* 3ffef2308e71a927a800000000000000 */
+ 9.76835024950062025261843245971249416E-01Q, /* 3ffef423b86b7ee79000000000000000 */
+ 9.80658249139538557015427500118676107E-01Q, /* 3ffef618d68936c09c00000000000000 */
+ 9.84496437005408397968864164795377292E-01Q, /* 3ffef80feabfeefa4800000000000000 */
+ 9.88349647113845042323276857132441364E-01Q, /* 3ffefa08f706bbf53800000000000000 */
+ 9.92217938260243514925207364285597578E-01Q, /* 3ffefc03fd56aa225000000000000000 */
+ 9.96101369470117486981664001177705359E-01Q, /* 3ffefe00ffaabffbbc00000000000000 */
+#define T_EXPL_RES1 (T_EXPL_ARG2 + 2 + 2*65 + 89)
+ 1.00000000000000000000000000000000000E+00Q, /* 3fff0000000000000000000000000000 */
+ 1.00391388933834757590801700644078664E+00Q, /* 3fff0100802ab5577800000000000000 */
+ 1.00784309720644799091004983893071767E+00Q, /* 3fff0202015600445c00000000000000 */
+ 1.01178768355933151879000320150225889E+00Q, /* 3fff0304848362076c00000000000000 */
+ 1.01574770858668572692806719715008512E+00Q, /* 3fff04080ab55de39000000000000000 */
+ 1.01972323271377413034244341361045372E+00Q, /* 3fff050c94ef7a206c00000000000000 */
+ 1.02371431660235789884438872832106426E+00Q, /* 3fff06122436410dd000000000000000 */
+ 1.02772102115162167201845022646011785E+00Q, /* 3fff0718b98f42085000000000000000 */
+ 1.03174340749910264936062276319717057E+00Q, /* 3fff08205601127ec800000000000000 */
+ 1.03578153702162378824169763902318664E+00Q, /* 3fff0928fa934ef90800000000000000 */
+ 1.03983547133622999947277776300325058E+00Q, /* 3fff0a32a84e9c1f5800000000000000 */
+ 1.04390527230112850620713516036630608E+00Q, /* 3fff0b3d603ca7c32800000000000000 */
+ 1.04799100201663270004459604933799710E+00Q, /* 3fff0c49236829e8bc00000000000000 */
+ 1.05209272282610977189420964350574650E+00Q, /* 3fff0d55f2dce5d1e800000000000000 */
+ 1.05621049731693195106174698594259098E+00Q, /* 3fff0e63cfa7ab09d000000000000000 */
+ 1.06034438832143151909548350886325352E+00Q, /* 3fff0f72bad65671b800000000000000 */
+ 1.06449445891785943185681162503897212E+00Q, /* 3fff1082b577d34ed800000000000000 */
+ 1.06866077243134810492719566354935523E+00Q, /* 3fff1193c09c1c595c00000000000000 */
+ 1.07284339243487741866189821848820429E+00Q, /* 3fff12a5dd543ccc4c00000000000000 */
+ 1.07704238275024494209120007326419000E+00Q, /* 3fff13b90cb25176a400000000000000 */
+ 1.08125780744903959851299646288680378E+00Q, /* 3fff14cd4fc989cd6400000000000000 */
+ 1.08548973085361949442173568058933597E+00Q, /* 3fff15e2a7ae28fecc00000000000000 */
+ 1.08973821753809324563988525369495619E+00Q, /* 3fff16f9157587069400000000000000 */
+ 1.09400333232930546678574046381982043E+00Q, /* 3fff18109a3611c35000000000000000 */
+ 1.09828514030782586896606289883493446E+00Q, /* 3fff192937074e0cd800000000000000 */
+ 1.10258370680894224324930519287590869E+00Q, /* 3fff1a42ed01d8cbc800000000000000 */
+ 1.10689909742365749645287564817408565E+00Q, /* 3fff1b5dbd3f68122400000000000000 */
+ 1.11123137799969046168868658241990488E+00Q, /* 3fff1c79a8dacc350c00000000000000 */
+ 1.11558061464248076122274255794764031E+00Q, /* 3fff1d96b0eff0e79400000000000000 */
+ 1.11994687371619722204840741142106708E+00Q, /* 3fff1eb4d69bde569c00000000000000 */
+ 1.12433022184475073235176978414529003E+00Q, /* 3fff1fd41afcba45e800000000000000 */
+ 1.12873072591281087273529237791080959E+00Q, /* 3fff20f47f31c92e4800000000000000 */
+ 1.13314845306682632219974493636982515E+00Q, /* 3fff2216045b6f5cd000000000000000 */
+ 1.13758347071604959399593326452304609E+00Q, /* 3fff2338ab9b32134800000000000000 */
+ 1.14203584653356560174586320499656722E+00Q, /* 3fff245c7613b8a9b000000000000000 */
+ 1.14650564845732405583333957110880874E+00Q, /* 3fff258164e8cdb0d800000000000000 */
+ 1.15099294469117646722011727433709893E+00Q, /* 3fff26a7793f60164400000000000000 */
+ 1.15549780370591653744227755851170514E+00Q, /* 3fff27ceb43d84490400000000000000 */
+ 1.16002029424032515603215642840950750E+00Q, /* 3fff28f7170a755fd800000000000000 */
+ 1.16456048530221917269855680387991015E+00Q, /* 3fff2a20a2ce96406400000000000000 */
+ 1.16911844616950438835445424956560601E+00Q, /* 3fff2b4b58b372c79400000000000000 */
+ 1.17369424639123270948104504896036815E+00Q, /* 3fff2c7739e3c0f32c00000000000000 */
+ 1.17828795578866324378353169777255971E+00Q, /* 3fff2da4478b620c7400000000000000 */
+ 1.18289964445632783673900689791480545E+00Q, /* 3fff2ed282d763d42400000000000000 */
+ 1.18752938276310060494722620205720887E+00Q, /* 3fff3001ecf601af7000000000000000 */
+ 1.19217724135327157730657177125976887E+00Q, /* 3fff31328716a5d63c00000000000000 */
+ 1.19684329114762477708211463323095813E+00Q, /* 3fff32645269ea829000000000000000 */
+ 1.20152760334452030077656559114984702E+00Q, /* 3fff339750219b212c00000000000000 */
+ 1.20623024942098072687102217059873510E+00Q, /* 3fff34cb8170b5835400000000000000 */
+ 1.21095130113378179892436037334846333E+00Q, /* 3fff3600e78b6b11d000000000000000 */
+ 1.21569083052054743854242246925423387E+00Q, /* 3fff373783a722012400000000000000 */
+ 1.22044890990084875515009343871497549E+00Q, /* 3fff386f56fa7686e800000000000000 */
+ 1.22522561187730755216662714701669756E+00Q, /* 3fff39a862bd3c106400000000000000 */
+ 1.23002100933670455162882717559114099E+00Q, /* 3fff3ae2a8287e7a8000000000000000 */
+ 1.23483517545109100499445276000187732E+00Q, /* 3fff3c1e2876834aa800000000000000 */
+ 1.23966818367890557750499169742397498E+00Q, /* 3fff3d5ae4e2cae92c00000000000000 */
+ 1.24452010776609517384017067342938390E+00Q, /* 3fff3e98deaa11dcbc00000000000000 */
+ 1.24939102174724003813111039562500082E+00Q, /* 3fff3fd8170a52071800000000000000 */
+ 1.25428099994668373895478907797951251E+00Q, /* 3fff41188f42c3e32000000000000000 */
+ 1.25919011697966698459794088194030337E+00Q, /* 3fff425a4893dfc3f800000000000000 */
+ 1.26411844775346637881341393949696794E+00Q, /* 3fff439d443f5f159000000000000000 */
+ 1.26906606746853711786826579555054195E+00Q, /* 3fff44e183883d9e4800000000000000 */
+ 1.27403305161966090564007458851847332E+00Q, /* 3fff462707b2bac20c00000000000000 */
+ 1.27901947599709753244923149395617656E+00Q, /* 3fff476dd2045ac67800000000000000 */
+ 1.28402541668774150540599521264084615E+00Q, /* 3fff48b5e3c3e8186800000000000000 */
+ 1.28905095007628295311619126550795045E+00Q, /* 3fff49ff3e397492bc00000000000000 */
+ 1.29409615284637330434591717676084954E+00Q, /* 3fff4b49e2ae5ac67400000000000000 */
+ 1.29916110198179535206719492634874769E+00Q, /* 3fff4c95d26d3f440800000000000000 */
+ 1.30424587476763775839572190307080746E+00Q, /* 3fff4de30ec211e60000000000000000 */
+ 1.30935054879147461104338390214252286E+00Q, /* 3fff4f3198fa0f1cf800000000000000 */
+ 1.31447520194454914310711046709911898E+00Q, /* 3fff50817263c13cd000000000000000 */
+ 1.31961991242296217130558488861424848E+00Q, /* 3fff51d29c4f01cb3000000000000000 */
+ 1.32478475872886558573071624778094701E+00Q, /* 3fff5325180cfacf7800000000000000 */
+ 1.32996981967165983640200010995613411E+00Q, /* 3fff5478e6f02823d000000000000000 */
+ 1.33517517436919680440254865061433520E+00Q, /* 3fff55ce0a4c58c7bc00000000000000 */
+ 1.34040090224898678084031189428060316E+00Q, /* 3fff57248376b033d800000000000000 */
+ 1.34564708304941055283521222918352578E+00Q, /* 3fff587c53c5a7af0400000000000000 */
+ 1.35091379682093615244298234756570309E+00Q, /* 3fff59d57c910fa4e000000000000000 */
+ 1.35620112392734021300455538039386738E+00Q, /* 3fff5b2fff3210fd9400000000000000 */
+ 1.36150914504693443252136830778908916E+00Q, /* 3fff5c8bdd032e770800000000000000 */
+ 1.36683794117379636690046140756749082E+00Q, /* 3fff5de9176045ff5400000000000000 */
+ 1.37218759361900544124779344201670028E+00Q, /* 3fff5f47afa69210a800000000000000 */
+ 1.37755818401188367960941150158760138E+00Q, /* 3fff60a7a734ab0e8800000000000000 */
+ 1.38294979430124120867162673675920814E+00Q, /* 3fff6208ff6a88a46000000000000000 */
+ 1.38836250675662681297595213436579797E+00Q, /* 3fff636bb9a983258400000000000000 */
+ 1.39379640396958309755959248832368758E+00Q, /* 3fff64cfd75454ee7c00000000000000 */
+ 1.39925156885490681313299887733592186E+00Q, /* 3fff663559cf1bc7c400000000000000 */
+ 1.40472808465191417726103395580139477E+00Q, /* 3fff679c427f5a49f400000000000000 */
+ 1.41022603492571069194738697660795879E+00Q, /* 3fff690492cbf9432c00000000000000 */
+ 1.41574550356846662335641440222389065E+00Q, /* 3fff6a6e4c1d491e1800000000000000 */
+
+ 9.98018323540573404351050612604012713E-01Q, /* 3ffefefc41f8d4bdb000000000000000 */
+ 9.98048781107475468932221929208026268E-01Q, /* 3ffeff003ff556aa8800000000000000 */
+ 9.98079239603882895082165305211674422E-01Q, /* 3ffeff043df9d4986000000000000000 */
+ 9.98109699029824021243584297735651489E-01Q, /* 3ffeff083c064e972c00000000000000 */
+ 9.98140159385327269125909310787392315E-01Q, /* 3ffeff0c3a1ac4b6ec00000000000000 */
+ 9.98170620670420977171843901487591211E-01Q, /* 3ffeff10383737079400000000000000 */
+ 9.98201082885133511579667242585856002E-01Q, /* 3ffeff14365ba5991c00000000000000 */
+ 9.98231546029493238547658506831794512E-01Q, /* 3ffeff183488107b7c00000000000000 */
+ 9.98262010103528552029672482603928074E-01Q, /* 3ffeff1c32bc77beb000000000000000 */
+ 9.98292475107267818223988342651864514E-01Q, /* 3ffeff2030f8db72b000000000000000 */
+ 9.98322941040739375573309644096298143E-01Q, /* 3ffeff242f3d3ba77000000000000000 */
+ 9.98353407903971645787066790944663808E-01Q, /* 3ffeff282d89986cf000000000000000 */
+ 9.98383875696992967307963340317655820E-01Q, /* 3ffeff2c2bddf1d32400000000000000 */
+ 9.98414344419831761845429696222709026E-01Q, /* 3ffeff302a3a47ea0c00000000000000 */
+ 9.98444814072516340086593800151604228E-01Q, /* 3ffeff34289e9ac19800000000000000 */
+ 9.98475284655075123740886056111776270E-01Q, /* 3ffeff38270aea69c800000000000000 */
+ 9.98505756167536479006585636852832977E-01Q, /* 3ffeff3c257f36f29400000000000000 */
+ 9.98536228609928799837547330753295682E-01Q, /* 3ffeff4023fb806bf800000000000000 */
+ 9.98566701982280452432050310562772211E-01Q, /* 3ffeff44227fc6e5ec00000000000000 */
+ 9.98597176284619802988373749030870385E-01Q, /* 3ffeff48210c0a706800000000000000 */
+ 9.98627651516975245460372434536111541E-01Q, /* 3ffeff4c1fa04b1b6800000000000000 */
+ 9.98658127679375173801901155457017012E-01Q, /* 3ffeff501e3c88f6e800000000000000 */
+ 9.98688604771847954211239084543194622E-01Q, /* 3ffeff541ce0c412e000000000000000 */
+ 9.98719082794421980642241010173165705E-01Q, /* 3ffeff581b8cfc7f4c00000000000000 */
+ 9.98749561747125619293186105096538085E-01Q, /* 3ffeff5c1a41324c2400000000000000 */
+ 9.98780041629987291873504773320746608E-01Q, /* 3ffeff6018fd65896800000000000000 */
+ 9.98810522443035364581476187595399097E-01Q, /* 3ffeff6417c196471000000000000000 */
+ 9.98841004186298203615379520670103375E-01Q, /* 3ffeff68168dc4951400000000000000 */
+ 9.98871486859804230684645176552294288E-01Q, /* 3ffeff6c1561f0837400000000000000 */
+ 9.98901970463581839743127943620493170E-01Q, /* 3ffeff70143e1a222c00000000000000 */
+ 9.98932454997659369233531378995394334E-01Q, /* 3ffeff74132241813000000000000000 */
+ 9.98962940462065268620861502313346136E-01Q, /* 3ffeff78120e66b08400000000000000 */
+ 9.98993426856827904103397486323956400E-01Q, /* 3ffeff7c110289c02000000000000000 */
+ 9.99023914181975669634994119405746460E-01Q, /* 3ffeff800ffeaac00000000000000000 */
+ 9.99054402437536959169506189937237650E-01Q, /* 3ffeff840f02c9c02000000000000000 */
+ 9.99084891623540138905212870668037795E-01Q, /* 3ffeff880e0ee6d07800000000000000 */
+ 9.99115381740013658307120181234495249E-01Q, /* 3ffeff8c0d2302010c00000000000000 */
+ 9.99145872786985911329082910015131347E-01Q, /* 3ffeff900c3f1b61d800000000000000 */
+ 9.99176364764485236413804614130640402E-01Q, /* 3ffeff940b633302d000000000000000 */
+ 9.99206857672540083026291313217370771E-01Q, /* 3ffeff980a8f48f3f800000000000000 */
+ 9.99237351511178817364822180024930276E-01Q, /* 3ffeff9c09c35d454800000000000000 */
+ 9.99267846280429861138827618560753763E-01Q, /* 3ffeffa008ff7006c000000000000000 */
+ 9.99298341980321608302162417203362565E-01Q, /* 3ffeffa4084381485c00000000000000 */
+ 9.99328838610882452808681364331278019E-01Q, /* 3ffeffa8078f911a1800000000000000 */
+ 9.99359336172140816367814863951934967E-01Q, /* 3ffeffac06e39f8bf400000000000000 */
+ 9.99389834664125092933417704443854745E-01Q, /* 3ffeffb0063facadec00000000000000 */
+ 9.99420334086863676459344674185558688E-01Q, /* 3ffeffb405a3b88ffc00000000000000 */
+ 9.99450834440384988655026177184481639E-01Q, /* 3ffeffb8050fc3422400000000000000 */
+ 9.99481335724717395718741386190231424E-01Q, /* 3ffeffbc0483ccd45c00000000000000 */
+ 9.99511837939889374871071936468069907E-01Q, /* 3ffeffc003ffd556ac00000000000000 */
+ 9.99542341085929264554721385138691403E-01Q, /* 3ffeffc40383dcd90800000000000000 */
+ 9.99572845162865514234695751838444266E-01Q, /* 3ffeffc8030fe36b7400000000000000 */
+ 9.99603350170726517864849824945849832E-01Q, /* 3ffeffcc02a3e91dec00000000000000 */
+ 9.99633856109540669399038392839429434E-01Q, /* 3ffeffd0023fee006c00000000000000 */
+ 9.99664362979336418302267475155531429E-01Q, /* 3ffeffd401e3f222f800000000000000 */
+ 9.99694870780142130772816244643763639E-01Q, /* 3ffeffd8018ff5958800000000000000 */
+ 9.99725379511986284031266336569387931E-01Q, /* 3ffeffdc0143f8682400000000000000 */
+ 9.99755889174897216520321308053098619E-01Q, /* 3ffeffe000fffaaac000000000000000 */
+ 9.99786399768903377704987178731244057E-01Q, /* 3ffeffe400c3fc6d6000000000000000 */
+ 9.99816911294033217050269968240172602E-01Q, /* 3ffeffe8008ffdc00800000000000000 */
+ 9.99847423750315072998873233700578567E-01Q, /* 3ffeffec0063feb2ac00000000000000 */
+ 9.99877937137777450526954226006637327E-01Q, /* 3ffefff0003fff555800000000000000 */
+ 9.99908451456448688077216502279043198E-01Q, /* 3ffefff40023ffb80000000000000000 */
+ 9.99938966706357262870241697783058044E-01Q, /* 3ffefff8000fffeaac00000000000000 */
+ 9.99969482887531541104308985268289689E-01Q, /* 3ffefffc0003fffd5400000000000000 */
+#define T_EXPL_RES2 (T_EXPL_RES1 + 1 + 89 + 65)
+ 1.00000000000000000000000000000000000E+00Q, /* 3fff0000000000000000000000000000 */
+ 1.00003051804379100575559391472779680E+00Q, /* 3fff0002000200015400000000000000 */
+ 1.00006103701893306334724798034585547E+00Q, /* 3fff00040008000aac00000000000000 */
+ 1.00009155692545448346209013834595680E+00Q, /* 3fff0006001200240000000000000000 */
+ 1.00012207776338379883185325525118969E+00Q, /* 3fff0008002000555800000000000000 */
+ 1.00015259953274932014366527255333494E+00Q, /* 3fff000a003200a6ac00000000000000 */
+ 1.00018312223357958012925905677548144E+00Q, /* 3fff000c004801200400000000000000 */
+ 1.00021364586590294498691378066723701E+00Q, /* 3fff000e006201c95c00000000000000 */
+ 1.00024417042974783642605984823603649E+00Q, /* 3fff0010008002aab400000000000000 */
+ 1.00027469592514273166727889474714175E+00Q, /* 3fff001200a203cc1000000000000000 */
+ 1.00030522235211605242000132420798764E+00Q, /* 3fff001400c805357000000000000000 */
+ 1.00033574971069616488250630936818197E+00Q, /* 3fff001600f206eed000000000000000 */
+ 1.00036627800091160178652671675081365E+00Q, /* 3fff0018012009003800000000000000 */
+ 1.00039680722279067381919048784766346E+00Q, /* 3fff001a01520b71a000000000000000 */
+ 1.00042733737636191371223048918182030E+00Q, /* 3fff001c01880e4b1000000000000000 */
+ 1.00045786846165368766392589350289200E+00Q, /* 3fff001e01c211948400000000000000 */
+ 1.00048840047869447289485833607614040E+00Q, /* 3fff0020020015560000000000000000 */
+ 1.00051893342751269111445822090900037E+00Q, /* 3fff0022024219978400000000000000 */
+ 1.00054946730813676403215595200890675E+00Q, /* 3fff002402881e611000000000000000 */
+ 1.00058000212059516886853316464112140E+00Q, /* 3fff002602d223baa800000000000000 */
+ 1.00061053786491632733302026281307917E+00Q, /* 3fff0028032029ac4c00000000000000 */
+ 1.00064107454112866113504765053221490E+00Q, /* 3fff002a0372303dfc00000000000000 */
+ 1.00067161214926059198404573180596344E+00Q, /* 3fff002c03c83777b800000000000000 */
+ 1.00070215068934059710059614189958666E+00Q, /* 3fff002e04223f618400000000000000 */
+ 1.00073269016139709819412928482051939E+00Q, /* 3fff0030048048036000000000000000 */
+ 1.00076323056545857248522679583402351E+00Q, /* 3fff003204e251655000000000000000 */
+ 1.00079377190155338617216784768970683E+00Q, /* 3fff003405485b8f5000000000000000 */
+ 1.00082431416971007198668530691065826E+00Q, /* 3fff003605b266896800000000000000 */
+ 1.00085485736995705163820957750431262E+00Q, /* 3fff00380620725b9800000000000000 */
+ 1.00088540150232269132501983222027775E+00Q, /* 3fff003a06927f0ddc00000000000000 */
+ 1.00091594656683552377884893758164253E+00Q, /* 3fff003c07088ca83c00000000000000 */
+ 1.00094649256352402622027852885366883E+00Q, /* 3fff003e07829b32bc00000000000000 */
+ 1.00097703949241650933643654752813745E+00Q, /* 3fff00400800aab55400000000000000 */
+ 1.00100758735354156137020709138596430E+00Q, /* 3fff00420882bb381000000000000000 */
+ 1.00103813614692760403102056443458423E+00Q, /* 3fff00440908ccc2f000000000000000 */
+ 1.00106868587260300351715613942360505E+00Q, /* 3fff00460992df5df000000000000000 */
+ 1.00109923653059629256034668287611566E+00Q, /* 3fff00480a20f3111800000000000000 */
+ 1.00112978812093589287002259879955091E+00Q, /* 3fff004a0ab307e46800000000000000 */
+ 1.00116034064365022615561429120134562E+00Q, /* 3fff004c0b491ddfe000000000000000 */
+ 1.00119089409876788066000585786241572E+00Q, /* 3fff004e0be3350b8c00000000000000 */
+ 1.00122144848631711155917400901671499E+00Q, /* 3fff00500c814d6f6000000000000000 */
+ 1.00125200380632656260715407370298635E+00Q, /* 3fff00520d2367136c00000000000000 */
+ 1.00128256005882454449107399341301061E+00Q, /* 3fff00540dc981ffa800000000000000 */
+ 1.00131311724383964545381786592770368E+00Q, /* 3fff00560e739e3c2000000000000000 */
+ 1.00134367536140017618251363273884635E+00Q, /* 3fff00580f21bbd0cc00000000000000 */
+ 1.00137423441153472492004539162735455E+00Q, /* 3fff005a0fd3dac5b800000000000000 */
+ 1.00140479439427171337584354660066310E+00Q, /* 3fff005c1089fb22e400000000000000 */
+ 1.00143535530963956325933850166620687E+00Q, /* 3fff005e11441cf05000000000000000 */
+ 1.00146591715766680730226312334707472E+00Q, /* 3fff0060120240360400000000000000 */
+ 1.00149647993838186721404781565070152E+00Q, /* 3fff006212c464fc0000000000000000 */
+ 1.00152704365181316470412298258452211E+00Q, /* 3fff0064138a8b4a4400000000000000 */
+ 1.00155760829798923250422149067162536E+00Q, /* 3fff00661454b328d800000000000000 */
+ 1.00158817387693849232377374391944613E+00Q, /* 3fff00681522dc9fbc00000000000000 */
+ 1.00161874038868942138336137759324629E+00Q, /* 3fff006a15f507b6f400000000000000 */
+ 1.00164930783327055241471725821611471E+00Q, /* 3fff006c16cb34768800000000000000 */
+ 1.00167987621071025161612055853765924E+00Q, /* 3fff006e17a562e67400000000000000 */
+ 1.00171044552103705171930414508096874E+00Q, /* 3fff00701883930ec000000000000000 */
+ 1.00174101576427937443369842185347807E+00Q, /* 3fff00721965c4f76c00000000000000 */
+ 1.00177158694046569697988502412044909E+00Q, /* 3fff00741a4bf8a87c00000000000000 */
+ 1.00180215904962455208959681840497069E+00Q, /* 3fff00761b362e29f800000000000000 */
+ 1.00183273209178441698341543997230474E+00Q, /* 3fff00781c246583e400000000000000 */
+ 1.00186330606697365785962006157205906E+00Q, /* 3fff007a1d169ebe3c00000000000000 */
+ 1.00189388097522080744994354972732253E+00Q, /* 3fff007c1e0cd9e10800000000000000 */
+ 1.00192445681655439848611877096118405E+00Q, /* 3fff007e1f0716f45000000000000000 */
+ 1.00195503359100279716642489802325144E+00Q, /* 3fff0080200556001000000000000000 */
+ 1.00198561129859459173374602869444061E+00Q, /* 3fff00822107970c5400000000000000 */
+};
diff --git a/libquadmath/math/fabsq.c b/libquadmath/math/fabsq.c
index a103f840f38..27e8b282478 100644
--- a/libquadmath/math/fabsq.c
+++ b/libquadmath/math/fabsq.c
@@ -1,4 +1,4 @@
-/* fabsq.c -- __float128 version of s_fabs.c.
+/* s_fabsl.c -- long double version of s_fabs.c.
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -13,13 +13,20 @@
* ====================================================
*/
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * fabsq(x) returns the absolute value of x.
+ */
+
#include "quadmath-imp.h"
-__float128
-fabsq (__float128 x)
+__float128 fabsq(__float128 x)
{
- uint64_t hx;
- GET_FLT128_MSW64(hx,x);
- SET_FLT128_MSW64(x,hx&0x7fffffffffffffffLL);
- return x;
+ uint64_t hx;
+ GET_FLT128_MSW64(hx,x);
+ SET_FLT128_MSW64(x,hx&0x7fffffffffffffffLL);
+ return x;
}
diff --git a/libquadmath/math/fdimq.c b/libquadmath/math/fdimq.c
index 539fb08c641..501e9169520 100644
--- a/libquadmath/math/fdimq.c
+++ b/libquadmath/math/fdimq.c
@@ -1,5 +1,5 @@
/* Return positive difference between arguments.
- Copyright (C) 1997, 2004, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -14,29 +14,19 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
-#include <errno.h>
#include "quadmath-imp.h"
__float128
fdimq (__float128 x, __float128 y)
{
- int clsx = fpclassifyq (x);
- int clsy = fpclassifyq (y);
+ if (__builtin_islessequal (x, y))
+ return 0;
- if (clsx == QUADFP_NAN || clsy == QUADFP_NAN
- || (y < 0 && clsx == QUADFP_INFINITE && clsy == QUADFP_INFINITE))
- /* Raise invalid flag. */
- return x - y;
-
- if (x <= y)
- return 0.0Q;
-
- __float128 r = x - y;
- if (isinfq (r))
+ __float128 r = math_narrow_eval (x - y);
+ if (isinfq (r) && !isinfq (x) && !isinfq (y))
errno = ERANGE;
return r;
diff --git a/libquadmath/math/finiteq.c b/libquadmath/math/finiteq.c
index e6703fb2261..5d554a02204 100644
--- a/libquadmath/math/finiteq.c
+++ b/libquadmath/math/finiteq.c
@@ -1,4 +1,4 @@
-/* finiteq.c -- __float128 version of s_finite.c.
+/* s_finitel.c -- long double version of s_finite.c.
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -13,18 +13,21 @@
* ====================================================
*/
-#include "quadmath-imp.h"
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
/*
* finiteq(x) returns 1 is x is finite, else 0;
* no branching!
*/
-int
-finiteq (const __float128 x)
+#include "quadmath-imp.h"
+
+int finiteq(__float128 x)
{
- int64_t hx;
- GET_FLT128_MSW64(hx,x);
- return (int)((uint64_t)((hx&0x7fff000000000000LL)
- -0x7fff000000000000LL)>>63);
+ int64_t hx;
+ GET_FLT128_MSW64(hx,x);
+ return (int)((uint64_t)((hx&0x7fff000000000000LL)
+ -0x7fff000000000000LL)>>63);
}
diff --git a/libquadmath/math/floorq.c b/libquadmath/math/floorq.c
index 41b993fa7a0..4e18a39f358 100644
--- a/libquadmath/math/floorq.c
+++ b/libquadmath/math/floorq.c
@@ -1,4 +1,4 @@
-/* floorq.c -- __float128 version of s_floor.c.
+/* s_floorl.c -- long double version of s_floor.c.
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -13,10 +13,22 @@
* ====================================================
*/
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * floorq(x)
+ * Return x rounded toward -inf to integral value
+ * Method:
+ * Bit twiddling.
+ */
+
+#define NO_MATH_REDIRECT
+
#include "quadmath-imp.h"
-__float128
-floorq (__float128 x)
+__float128 floorq(__float128 x)
{
int64_t i0,i1,j0;
uint64_t i,j;
diff --git a/libquadmath/math/fmaxq.c b/libquadmath/math/fmaxq.c
index e8ed6f440aa..661bb6b6ef2 100644
--- a/libquadmath/math/fmaxq.c
+++ b/libquadmath/math/fmaxq.c
@@ -1,5 +1,5 @@
/* Return maximum numeric value of X and Y.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -14,15 +14,20 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
-
__float128
fmaxq (__float128 x, __float128 y)
{
- return (__builtin_isgreaterequal (x, y) || isnanq (y)) ? x : y;
+ if (__builtin_isgreaterequal (x, y))
+ return x;
+ else if (__builtin_isless (x, y))
+ return y;
+ else if (issignalingq (x) || issignalingq (y))
+ return x + y;
+ else
+ return isnanq (y) ? x : y;
}
diff --git a/libquadmath/math/fminq.c b/libquadmath/math/fminq.c
index 2fbe4116a6d..60998094020 100644
--- a/libquadmath/math/fminq.c
+++ b/libquadmath/math/fminq.c
@@ -1,5 +1,5 @@
/* Return minimum numeric value of X and Y.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -14,15 +14,20 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
-
__float128
fminq (__float128 x, __float128 y)
{
- return (__builtin_islessequal (x, y) || isnanq (y)) ? x : y;
+ if (__builtin_islessequal (x, y))
+ return x;
+ else if (__builtin_isgreater (x, y))
+ return y;
+ else if (issignalingq (x) || issignalingq (y))
+ return x + y;
+ else
+ return isnanq (y) ? x : y;
}
diff --git a/libquadmath/math/fmodq.c b/libquadmath/math/fmodq.c
index 55eb18ffb0a..4b1c476d68b 100644
--- a/libquadmath/math/fmodq.c
+++ b/libquadmath/math/fmodq.c
@@ -1,18 +1,18 @@
-/* fmodq.c -- __float128 version of e_fmod.c.
+/* e_fmodl.c -- long double version of e_fmod.c.
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
/*
* ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ * Copyright (C) 1993, 2011 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-/*
+/*
* fmodq(x,y)
* Return x mod y in exact arithmetic
* Method: shift and subtract
@@ -25,105 +25,105 @@ static const __float128 one = 1.0, Zero[] = {0.0, -0.0,};
__float128
fmodq (__float128 x, __float128 y)
{
- int64_t n,hx,hy,hz,ix,iy,sx,i;
- uint64_t lx,ly,lz;
+ int64_t n,hx,hy,hz,ix,iy,sx,i;
+ uint64_t lx,ly,lz;
- GET_FLT128_WORDS64(hx,lx,x);
- GET_FLT128_WORDS64(hy,ly,y);
- sx = hx&0x8000000000000000ULL; /* sign of x */
- hx ^=sx; /* |x| */
- hy &= 0x7fffffffffffffffLL; /* |y| */
+ GET_FLT128_WORDS64(hx,lx,x);
+ GET_FLT128_WORDS64(hy,ly,y);
+ sx = hx&0x8000000000000000ULL; /* sign of x */
+ hx ^=sx; /* |x| */
+ hy &= 0x7fffffffffffffffLL; /* |y| */
- /* purge off exception values */
- if((hy|ly)==0||(hx>=0x7fff000000000000LL)|| /* y=0,or x not finite */
- ((hy|((ly|-ly)>>63))>0x7fff000000000000LL)) /* or y is NaN */
- return (x*y)/(x*y);
- if(hx<=hy) {
- if((hx<hy)||(lx<ly)) return x; /* |x|<|y| return x */
- if(lx==ly)
- return Zero[(uint64_t)sx>>63]; /* |x|=|y| return x*0*/
- }
+ /* purge off exception values */
+ if((hy|ly)==0||(hx>=0x7fff000000000000LL)|| /* y=0,or x not finite */
+ ((hy|((ly|-ly)>>63))>0x7fff000000000000LL)) /* or y is NaN */
+ return (x*y)/(x*y);
+ if(hx<=hy) {
+ if((hx<hy)||(lx<ly)) return x; /* |x|<|y| return x */
+ if(lx==ly)
+ return Zero[(uint64_t)sx>>63]; /* |x|=|y| return x*0*/
+ }
- /* determine ix = ilogb(x) */
- if(hx<0x0001000000000000LL) { /* subnormal x */
- if(hx==0) {
- for (ix = -16431, i=lx; i>0; i<<=1) ix -=1;
- } else {
- for (ix = -16382, i=hx<<15; i>0; i<<=1) ix -=1;
- }
- } else ix = (hx>>48)-0x3fff;
+ /* determine ix = ilogb(x) */
+ if(hx<0x0001000000000000LL) { /* subnormal x */
+ if(hx==0) {
+ for (ix = -16431, i=lx; i>0; i<<=1) ix -=1;
+ } else {
+ for (ix = -16382, i=hx<<15; i>0; i<<=1) ix -=1;
+ }
+ } else ix = (hx>>48)-0x3fff;
- /* determine iy = ilogb(y) */
- if(hy<0x0001000000000000LL) { /* subnormal y */
- if(hy==0) {
- for (iy = -16431, i=ly; i>0; i<<=1) iy -=1;
- } else {
- for (iy = -16382, i=hy<<15; i>0; i<<=1) iy -=1;
- }
- } else iy = (hy>>48)-0x3fff;
+ /* determine iy = ilogb(y) */
+ if(hy<0x0001000000000000LL) { /* subnormal y */
+ if(hy==0) {
+ for (iy = -16431, i=ly; i>0; i<<=1) iy -=1;
+ } else {
+ for (iy = -16382, i=hy<<15; i>0; i<<=1) iy -=1;
+ }
+ } else iy = (hy>>48)-0x3fff;
- /* set up {hx,lx}, {hy,ly} and align y to x */
- if(ix >= -16382)
- hx = 0x0001000000000000LL|(0x0000ffffffffffffLL&hx);
- else { /* subnormal x, shift x to normal */
- n = -16382-ix;
- if(n<=63) {
- hx = (hx<<n)|(lx>>(64-n));
- lx <<= n;
- } else {
- hx = lx<<(n-64);
- lx = 0;
- }
- }
- if(iy >= -16382)
- hy = 0x0001000000000000LL|(0x0000ffffffffffffLL&hy);
- else { /* subnormal y, shift y to normal */
- n = -16382-iy;
- if(n<=63) {
- hy = (hy<<n)|(ly>>(64-n));
- ly <<= n;
- } else {
- hy = ly<<(n-64);
- ly = 0;
- }
- }
+ /* set up {hx,lx}, {hy,ly} and align y to x */
+ if(ix >= -16382)
+ hx = 0x0001000000000000LL|(0x0000ffffffffffffLL&hx);
+ else { /* subnormal x, shift x to normal */
+ n = -16382-ix;
+ if(n<=63) {
+ hx = (hx<<n)|(lx>>(64-n));
+ lx <<= n;
+ } else {
+ hx = lx<<(n-64);
+ lx = 0;
+ }
+ }
+ if(iy >= -16382)
+ hy = 0x0001000000000000LL|(0x0000ffffffffffffLL&hy);
+ else { /* subnormal y, shift y to normal */
+ n = -16382-iy;
+ if(n<=63) {
+ hy = (hy<<n)|(ly>>(64-n));
+ ly <<= n;
+ } else {
+ hy = ly<<(n-64);
+ ly = 0;
+ }
+ }
- /* fix point fmod */
- n = ix - iy;
- while(n--) {
- hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
- if(hz<0){hx = hx+hx+(lx>>63); lx = lx+lx;}
- else {
- if((hz|lz)==0) /* return sign(x)*0 */
- return Zero[(uint64_t)sx>>63];
- hx = hz+hz+(lz>>63); lx = lz+lz;
- }
- }
- hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
- if(hz>=0) {hx=hz;lx=lz;}
+ /* fix point fmod */
+ n = ix - iy;
+ while(n--) {
+ hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
+ if(hz<0){hx = hx+hx+(lx>>63); lx = lx+lx;}
+ else {
+ if((hz|lz)==0) /* return sign(x)*0 */
+ return Zero[(uint64_t)sx>>63];
+ hx = hz+hz+(lz>>63); lx = lz+lz;
+ }
+ }
+ hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
+ if(hz>=0) {hx=hz;lx=lz;}
- /* convert back to floating value and restore the sign */
- if((hx|lx)==0) /* return sign(x)*0 */
- return Zero[(uint64_t)sx>>63];
- while(hx<0x0001000000000000LL) { /* normalize x */
- hx = hx+hx+(lx>>63); lx = lx+lx;
- iy -= 1;
- }
- if(iy>= -16382) { /* normalize output */
- hx = ((hx-0x0001000000000000LL)|((iy+16383)<<48));
- SET_FLT128_WORDS64(x,hx|sx,lx);
- } else { /* subnormal output */
- n = -16382 - iy;
- if(n<=48) {
- lx = (lx>>n)|((uint64_t)hx<<(64-n));
- hx >>= n;
- } else if (n<=63) {
- lx = (hx<<(64-n))|(lx>>n); hx = sx;
- } else {
- lx = hx>>(n-64); hx = sx;
- }
- SET_FLT128_WORDS64(x,hx|sx,lx);
- x *= one; /* create necessary signal */
- }
- return x; /* exact output */
+ /* convert back to floating value and restore the sign */
+ if((hx|lx)==0) /* return sign(x)*0 */
+ return Zero[(uint64_t)sx>>63];
+ while(hx<0x0001000000000000LL) { /* normalize x */
+ hx = hx+hx+(lx>>63); lx = lx+lx;
+ iy -= 1;
+ }
+ if(iy>= -16382) { /* normalize output */
+ hx = ((hx-0x0001000000000000LL)|((iy+16383)<<48));
+ SET_FLT128_WORDS64(x,hx|sx,lx);
+ } else { /* subnormal output */
+ n = -16382 - iy;
+ if(n<=48) {
+ lx = (lx>>n)|((uint64_t)hx<<(64-n));
+ hx >>= n;
+ } else if (n<=63) {
+ lx = (hx<<(64-n))|(lx>>n); hx = sx;
+ } else {
+ lx = hx>>(n-64); hx = sx;
+ }
+ SET_FLT128_WORDS64(x,hx|sx,lx);
+ x *= one; /* create necessary signal */
+ }
+ return x; /* exact output */
}
diff --git a/libquadmath/math/frexpq.c b/libquadmath/math/frexpq.c
index 2bd77829bf2..2c381e590df 100644
--- a/libquadmath/math/frexpq.c
+++ b/libquadmath/math/frexpq.c
@@ -1,4 +1,4 @@
-/* frexpq.c -- __float128 version of s_frexp.c.
+/* s_frexpl.c -- long double version of s_frexp.c.
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -13,10 +13,14 @@
* ====================================================
*/
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
/*
* for non-zero x
* x = frexpq(arg,&exp);
- * return a __float128 fp quantity x such that 0.5 <= |x| <1.0
+ * return a long double fp quantity x such that 0.5 <= |x| <1.0
* and the corresponding binary exponent "exp". That is
* arg = x*2^exp.
* If arg is inf, 0.0, or NaN, then frexpq(arg,&exp) returns arg
@@ -28,22 +32,21 @@
static const __float128
two114 = 2.0769187434139310514121985316880384E+34Q; /* 0x4071000000000000, 0 */
-__float128
-frexpq (__float128 x, int *eptr)
+__float128 frexpq(__float128 x, int *eptr)
{
- uint64_t hx, lx, ix;
- GET_FLT128_WORDS64(hx,lx,x);
- ix = 0x7fffffffffffffffULL&hx;
- *eptr = 0;
- if(ix>=0x7fff000000000000ULL||((ix|lx)==0)) return x + x;/* 0,inf,nan */
- if (ix<0x0001000000000000ULL) { /* subnormal */
- x *= two114;
- GET_FLT128_MSW64(hx,x);
- ix = hx&0x7fffffffffffffffULL;
- *eptr = -114;
- }
- *eptr += (ix>>48)-16382;
- hx = (hx&0x8000ffffffffffffULL) | 0x3ffe000000000000ULL;
- SET_FLT128_MSW64(x,hx);
- return x;
+ uint64_t hx, lx, ix;
+ GET_FLT128_WORDS64(hx,lx,x);
+ ix = 0x7fffffffffffffffULL&hx;
+ *eptr = 0;
+ if(ix>=0x7fff000000000000ULL||((ix|lx)==0)) return x + x;/* 0,inf,nan */
+ if (ix<0x0001000000000000ULL) { /* subnormal */
+ x *= two114;
+ GET_FLT128_MSW64(hx,x);
+ ix = hx&0x7fffffffffffffffULL;
+ *eptr = -114;
+ }
+ *eptr += (ix>>48)-16382;
+ hx = (hx&0x8000ffffffffffffULL) | 0x3ffe000000000000ULL;
+ SET_FLT128_MSW64(x,hx);
+ return x;
}
diff --git a/libquadmath/math/hypotq.c b/libquadmath/math/hypotq.c
index 057901073dc..8dcb749819e 100644
--- a/libquadmath/math/hypotq.c
+++ b/libquadmath/math/hypotq.c
@@ -1,3 +1,7 @@
+/* e_hypotl.c -- long double version of e_hypot.c.
+ * Conversion to long double by Jakub Jelinek, jakub@redhat.com.
+ */
+
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -9,19 +13,14 @@
* ====================================================
*/
-/* From e_hypotl.c -- long double version of e_hypot.c.
- * Conversion to long double by Jakub Jelinek, jakub@redhat.com.
- * Conversion to __float128 by FX Coudert, fxcoudert@gcc.gnu.org.
- */
-
/* hypotq(x,y)
*
* Method :
* If (assume round-to-nearest) z=x*x+y*y
- * has error less than sqrtl(2)/2 ulp, than
- * sqrtl(z) has error less than 1 ulp (exercise).
+ * has error less than sqrtq(2)/2 ulp, than
+ * sqrtq(z) has error less than 1 ulp (exercise).
*
- * So, compute sqrtl(x*x+y*y) with some care as
+ * So, compute sqrtq(x*x+y*y) with some care as
* follows to get the error below 1 ulp:
*
* Assume x>y>0;
@@ -38,100 +37,102 @@
* large or too tiny
*
* Special cases:
- * hypotq(x,y) is INF if x or y is +INF or -INF; else
- * hypotq(x,y) is NAN if x or y is NAN.
+ * hypotl(x,y) is INF if x or y is +INF or -INF; else
+ * hypotl(x,y) is NAN if x or y is NAN.
*
* Accuracy:
- * hypotq(x,y) returns sqrtl(x^2+y^2) with error less
- * than 1 ulps (units in the last place)
+ * hypotl(x,y) returns sqrtq(x^2+y^2) with error less
+ * than 1 ulps (units in the last place)
*/
#include "quadmath-imp.h"
__float128
-hypotq (__float128 x, __float128 y)
+hypotq(__float128 x, __float128 y)
{
- __float128 a, b, t1, t2, y1, y2, w;
- int64_t j, k, ha, hb;
+ __float128 a,b,t1,t2,y1,y2,w;
+ int64_t j,k,ha,hb;
- GET_FLT128_MSW64(ha,x);
- ha &= 0x7fffffffffffffffLL;
- GET_FLT128_MSW64(hb,y);
- hb &= 0x7fffffffffffffffLL;
- if(hb > ha) {a=y;b=x;j=ha; ha=hb;hb=j;} else {a=x;b=y;}
- SET_FLT128_MSW64(a,ha); /* a <- |a| */
- SET_FLT128_MSW64(b,hb); /* b <- |b| */
- if((ha-hb)>0x78000000000000LL) {return a+b;} /* x/y > 2**120 */
- k=0;
- if(ha > 0x5f3f000000000000LL) { /* a>2**8000 */
- if(ha >= 0x7fff000000000000LL) { /* Inf or NaN */
- uint64_t low;
- w = a+b; /* for sNaN */
- GET_FLT128_LSW64(low,a);
- if(((ha&0xffffffffffffLL)|low)==0) w = a;
- GET_FLT128_LSW64(low,b);
- if(((hb^0x7fff000000000000LL)|low)==0) w = b;
- return w;
- }
- /* scale a and b by 2**-9600 */
- ha -= 0x2580000000000000LL;
- hb -= 0x2580000000000000LL; k += 9600;
- SET_FLT128_MSW64(a,ha);
- SET_FLT128_MSW64(b,hb);
- }
- if(hb < 0x20bf000000000000LL) { /* b < 2**-8000 */
- if(hb <= 0x0000ffffffffffffLL) { /* subnormal b or 0 */
- uint64_t low;
- GET_FLT128_LSW64(low,b);
- if((hb|low)==0) return a;
- t1=0;
- SET_FLT128_MSW64(t1,0x7ffd000000000000LL); /* t1=2^16382 */
- b *= t1;
- a *= t1;
- k -= 16382;
- GET_FLT128_MSW64 (ha, a);
- GET_FLT128_MSW64 (hb, b);
- if (hb > ha)
- {
- t1 = a;
- a = b;
- b = t1;
- j = ha;
- ha = hb;
- hb = j;
- }
- } else { /* scale a and b by 2^9600 */
- ha += 0x2580000000000000LL; /* a *= 2^9600 */
- hb += 0x2580000000000000LL; /* b *= 2^9600 */
- k -= 9600;
- SET_FLT128_MSW64(a,ha);
- SET_FLT128_MSW64(b,hb);
- }
- }
+ GET_FLT128_MSW64(ha,x);
+ ha &= 0x7fffffffffffffffLL;
+ GET_FLT128_MSW64(hb,y);
+ hb &= 0x7fffffffffffffffLL;
+ if(hb > ha) {a=y;b=x;j=ha; ha=hb;hb=j;} else {a=x;b=y;}
+ SET_FLT128_MSW64(a,ha); /* a <- |a| */
+ SET_FLT128_MSW64(b,hb); /* b <- |b| */
+ if((ha-hb)>0x78000000000000LL) {return a+b;} /* x/y > 2**120 */
+ k=0;
+ if(ha > 0x5f3f000000000000LL) { /* a>2**8000 */
+ if(ha >= 0x7fff000000000000LL) { /* Inf or NaN */
+ uint64_t low;
+ w = a+b; /* for sNaN */
+ if (issignalingq (a) || issignalingq (b))
+ return w;
+ GET_FLT128_LSW64(low,a);
+ if(((ha&0xffffffffffffLL)|low)==0) w = a;
+ GET_FLT128_LSW64(low,b);
+ if(((hb^0x7fff000000000000LL)|low)==0) w = b;
+ return w;
+ }
+ /* scale a and b by 2**-9600 */
+ ha -= 0x2580000000000000LL;
+ hb -= 0x2580000000000000LL; k += 9600;
+ SET_FLT128_MSW64(a,ha);
+ SET_FLT128_MSW64(b,hb);
+ }
+ if(hb < 0x20bf000000000000LL) { /* b < 2**-8000 */
+ if(hb <= 0x0000ffffffffffffLL) { /* subnormal b or 0 */
+ uint64_t low;
+ GET_FLT128_LSW64(low,b);
+ if((hb|low)==0) return a;
+ t1=0;
+ SET_FLT128_MSW64(t1,0x7ffd000000000000LL); /* t1=2^16382 */
+ b *= t1;
+ a *= t1;
+ k -= 16382;
+ GET_FLT128_MSW64 (ha, a);
+ GET_FLT128_MSW64 (hb, b);
+ if (hb > ha)
+ {
+ t1 = a;
+ a = b;
+ b = t1;
+ j = ha;
+ ha = hb;
+ hb = j;
+ }
+ } else { /* scale a and b by 2^9600 */
+ ha += 0x2580000000000000LL; /* a *= 2^9600 */
+ hb += 0x2580000000000000LL; /* b *= 2^9600 */
+ k -= 9600;
+ SET_FLT128_MSW64(a,ha);
+ SET_FLT128_MSW64(b,hb);
+ }
+ }
/* medium size a and b */
- w = a-b;
- if (w>b) {
- t1 = 0;
- SET_FLT128_MSW64(t1,ha);
- t2 = a-t1;
- w = sqrtq(t1*t1-(b*(-b)-t2*(a+t1)));
- } else {
- a = a+a;
- y1 = 0;
- SET_FLT128_MSW64(y1,hb);
- y2 = b - y1;
- t1 = 0;
- SET_FLT128_MSW64(t1,ha+0x0001000000000000LL);
- t2 = a - t1;
- w = sqrtq(t1*y1-(w*(-w)-(t1*y2+t2*b)));
- }
- if(k!=0) {
- uint64_t high;
- t1 = 1.0Q;
- GET_FLT128_MSW64(high,t1);
- SET_FLT128_MSW64(t1,high+(k<<48));
- w *= t1;
- math_check_force_underflow_nonneg (w);
- return w;
- } else return w;
+ w = a-b;
+ if (w>b) {
+ t1 = 0;
+ SET_FLT128_MSW64(t1,ha);
+ t2 = a-t1;
+ w = sqrtq(t1*t1-(b*(-b)-t2*(a+t1)));
+ } else {
+ a = a+a;
+ y1 = 0;
+ SET_FLT128_MSW64(y1,hb);
+ y2 = b - y1;
+ t1 = 0;
+ SET_FLT128_MSW64(t1,ha+0x0001000000000000LL);
+ t2 = a - t1;
+ w = sqrtq(t1*y1-(w*(-w)-(t1*y2+t2*b)));
+ }
+ if(k!=0) {
+ uint64_t high;
+ t1 = 1;
+ GET_FLT128_MSW64(high,t1);
+ SET_FLT128_MSW64(t1,high+(k<<48));
+ w *= t1;
+ math_check_force_underflow_nonneg (w);
+ return w;
+ } else return w;
}
diff --git a/libquadmath/math/ilogbq.c b/libquadmath/math/ilogbq.c
index 7f95e9c2240..7b66c29d6dd 100644
--- a/libquadmath/math/ilogbq.c
+++ b/libquadmath/math/ilogbq.c
@@ -1,4 +1,4 @@
-/* ilogbq.c -- __float128 version of s_ilogb.c.
+/* s_ilogbl.c -- long double version of s_ilogb.c.
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -17,18 +17,15 @@
static char rcsid[] = "$NetBSD: $";
#endif
-/* ilogbl(__float128 x)
+/* ilogbl(long double x)
* return the binary exponent of non-zero x
* ilogbl(0) = FP_ILOGB0
* ilogbl(NaN) = FP_ILOGBNAN (no signal is raised)
* ilogbl(+-Inf) = INT_MAX (no signal is raised)
*/
-#include <limits.h>
#include <math.h>
-#include <errno.h>
#include "quadmath-imp.h"
-
#ifndef FP_ILOGB0
# define FP_ILOGB0 INT_MIN
#endif
@@ -36,8 +33,7 @@ static char rcsid[] = "$NetBSD: $";
# define FP_ILOGBNAN INT_MAX
#endif
-int
-ilogbq (__float128 x)
+int ilogbq (__float128 x)
{
int64_t hx,lx;
int ix;
@@ -46,13 +42,7 @@ ilogbq (__float128 x)
hx &= 0x7fffffffffffffffLL;
if(hx <= 0x0001000000000000LL) {
if((hx|lx)==0)
- {
- errno = EDOM;
-#ifdef USE_FENV_H
- feraiseexcept (FE_INVALID);
-#endif
- return FP_ILOGB0; /* ilogbl(0) = FP_ILOGB0 */
- }
+ { errno = EDOM; feraiseexcept (FE_INVALID); return FP_ILOGB0; } /* ilogbl(0) = FP_ILOGB0 */
else /* subnormal x */
if(hx==0) {
for (ix = -16431; lx>0; lx<<=1) ix -=1;
@@ -65,18 +55,7 @@ ilogbq (__float128 x)
else if (FP_ILOGBNAN != INT_MAX) {
/* ISO C99 requires ilogbl(+-Inf) == INT_MAX. */
if (((hx^0x7fff000000000000LL)|lx) == 0)
- {
- errno = EDOM;
-#ifdef USE_FENV_H
- feraiseexcept (FE_INVALID);
-#endif
- return INT_MAX;
- }
+ { errno = EDOM; feraiseexcept (FE_INVALID); return INT_MAX; }
}
-
- errno = EDOM;
-#ifdef USE_FENV_H
- feraiseexcept (FE_INVALID);
-#endif
- return FP_ILOGBNAN;
+ { errno = EDOM; feraiseexcept (FE_INVALID); return FP_ILOGBNAN; }
}
diff --git a/libquadmath/math/isinf_nsq.c b/libquadmath/math/isinf_nsq.c
deleted file mode 100644
index 2f0834361c5..00000000000
--- a/libquadmath/math/isinf_nsq.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Written by Ulrich Drepper <drepper@gmail.com>
- */
-
-/*
- * __quadmath_isinf_nsq (x) returns != 0 if x is ±inf, else 0;
- * no branching!
- */
-
-#include "quadmath-imp.h"
-
-int
-__quadmath_isinf_nsq (__float128 x)
-{
- int64_t hx,lx;
- GET_FLT128_WORDS64(hx,lx,x);
- return !(lx | ((hx & 0x7fffffffffffffffLL) ^ 0x7fff000000000000LL));
-}
-
diff --git a/libquadmath/math/isinfq.c b/libquadmath/math/isinfq.c
index 46996b54c3d..673fd22caf8 100644
--- a/libquadmath/math/isinfq.c
+++ b/libquadmath/math/isinfq.c
@@ -4,14 +4,23 @@
* Public domain.
*/
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * isinfq(x) returns 1 if x is inf, -1 if x is -inf, else 0;
+ * no branching!
+ */
+
#include "quadmath-imp.h"
int
isinfq (__float128 x)
{
- int64_t hx,lx;
- GET_FLT128_WORDS64(hx,lx,x);
- lx |= (hx & 0x7fffffffffffffffLL) ^ 0x7fff000000000000LL;
- lx |= -lx;
- return ~(lx >> 63) & (hx >> 62);
+ int64_t hx,lx;
+ GET_FLT128_WORDS64(hx,lx,x);
+ lx |= (hx & 0x7fffffffffffffffLL) ^ 0x7fff000000000000LL;
+ lx |= -lx;
+ return ~(lx >> 63) & (hx >> 62);
}
diff --git a/libquadmath/math/isnanq.c b/libquadmath/math/isnanq.c
index 4462d0139e0..633409816c6 100644
--- a/libquadmath/math/isnanq.c
+++ b/libquadmath/math/isnanq.c
@@ -1,4 +1,4 @@
-/* isnanq.c -- __float128 version of s_isnan.c.
+/* s_isnanl.c -- long double version of s_isnan.c.
* Conversion to long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -13,15 +13,23 @@
* ====================================================
*/
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * isnanq(x) returns 1 is x is nan, else 0;
+ * no branching!
+ */
+
#include "quadmath-imp.h"
-int
-isnanq (const __float128 x)
+int isnanq(__float128 x)
{
- int64_t hx,lx;
- GET_FLT128_WORDS64(hx,lx,x);
- hx &= 0x7fffffffffffffffLL;
- hx |= (uint64_t)(lx|(-lx))>>63;
- hx = 0x7fff000000000000LL - hx;
- return (int)((uint64_t)hx>>63);
+ int64_t hx,lx;
+ GET_FLT128_WORDS64(hx,lx,x);
+ hx &= 0x7fffffffffffffffLL;
+ hx |= (uint64_t)(lx|(-lx))>>63;
+ hx = 0x7fff000000000000LL - hx;
+ return (int)((uint64_t)hx>>63);
}
diff --git a/libquadmath/math/issignalingq.c b/libquadmath/math/issignalingq.c
new file mode 100644
index 00000000000..a3b597f3fa9
--- /dev/null
+++ b/libquadmath/math/issignalingq.c
@@ -0,0 +1,43 @@
+/* Test for signaling NaN.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "quadmath-imp.h"
+
+int
+issignalingq (__float128 x)
+{
+ uint64_t hxi, lxi __attribute__ ((unused));
+ GET_FLT128_WORDS64 (hxi, lxi, x);
+#if HIGH_ORDER_BIT_IS_SET_FOR_SNAN
+ /* We only have to care about the high-order bit of x's significand, because
+ having it set (sNaN) already makes the significand different from that
+ used to designate infinity. */
+ return ((hxi & UINT64_C (0x7fff800000000000))
+ == UINT64_C (0x7fff800000000000));
+#else
+ /* To keep the following comparison simple, toggle the quiet/signaling bit,
+ so that it is set for sNaNs. This is inverse to IEEE 754-2008 (as well as
+ common practice for IEEE 754-1985). */
+ hxi ^= UINT64_C (0x0000800000000000);
+ /* If lxi != 0, then set any suitable bit of the significand in hxi. */
+ hxi |= (lxi | -lxi) >> 63;
+ /* We have to compare for greater (instead of greater or equal), because x's
+ significand being all-zero designates infinity not NaN. */
+ return (hxi & UINT64_C (0x7fffffffffffffff)) > UINT64_C (0x7fff800000000000);
+#endif
+}
diff --git a/libquadmath/math/j0q.c b/libquadmath/math/j0q.c
index 2dc93d5292f..8fe60464f19 100644
--- a/libquadmath/math/j0q.c
+++ b/libquadmath/math/j0q.c
@@ -6,7 +6,7 @@
*
* SYNOPSIS:
*
- * __float128 x, y, j0l();
+ * long double x, y, j0l();
*
* y = j0l( x );
*
@@ -52,7 +52,7 @@
*
* SYNOPSIS:
*
- * __float128 x, y, y0l();
+ * double x, y, y0l();
*
* y = y0l( x );
*
@@ -88,8 +88,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
@@ -97,7 +97,7 @@
static const __float128 ONEOSQPI = 5.6418958354775628694807945156077258584405E-1Q;
/* 2 / pi */
static const __float128 TWOOPI = 6.3661977236758134307553505349005744813784E-1Q;
-static const __float128 zero = 0.0Q;
+static const __float128 zero = 0;
/* J0(x) = 1 - x^2/4 + x^2 x^2 R(x^2)
Peak relative error 3.4e-37
@@ -683,21 +683,21 @@ j0q (__float128 x)
if (x != x)
return x + x;
else
- return 0.0Q;
+ return 0;
}
- if (x == 0.0Q)
- return 1.0Q;
+ if (x == 0)
+ return 1;
xx = fabsq (x);
- if (xx <= 2.0Q)
+ if (xx <= 2)
{
if (xx < 0x1p-57Q)
- return 1.0Q;
+ return 1;
/* 0 <= x <= 2 */
z = xx * xx;
p = z * z * neval (z, J0_2N, NJ0_2N) / deval (z, J0_2D, NJ0_2D);
p -= 0.25Q * z;
- p += 1.0Q;
+ p += 1;
return p;
}
@@ -711,7 +711,7 @@ j0q (__float128 x)
sincosq (xx, &s, &c);
ss = s - c;
cc = s + c;
- if (xx <= FLT128_MAX / 2.0Q)
+ if (xx <= FLT128_MAX / 2)
{
z = -cosq (xx + xx);
if ((s * c) < 0)
@@ -723,7 +723,7 @@ j0q (__float128 x)
if (xx > 0x1p256Q)
return ONEOSQPI * cc / sqrtq (xx);
- xinv = 1.0Q / xx;
+ xinv = 1 / xx;
z = xinv * xinv;
if (xinv <= 0.25)
{
@@ -781,7 +781,7 @@ j0q (__float128 x)
q = neval (z, Q2_2r3N, NQ2_2r3N) / deval (z, Q2_2r3D, NQ2_2r3D);
}
}
- p = 1.0Q + z * p;
+ p = 1 + z * p;
q = z * xinv * q;
q = q - 0.125Q * xinv;
z = ONEOSQPI * (p * cc - q * ss) / sqrtq (xx);
@@ -789,11 +789,12 @@ j0q (__float128 x)
}
+
/* Y0(x) = 2/pi * log(x) * J0(x) + R(x^2)
Peak absolute error 1.7e-36 (relative where Y0 > 1)
0 <= x <= 2 */
#define NY0_2N 7
-static __float128 Y0_2N[NY0_2N + 1] = {
+static const __float128 Y0_2N[NY0_2N + 1] = {
-1.062023609591350692692296993537002558155E19Q,
2.542000883190248639104127452714966858866E19Q,
-1.984190771278515324281415820316054696545E18Q,
@@ -804,7 +805,7 @@ static __float128 Y0_2N[NY0_2N + 1] = {
8.230845651379566339707130644134372793322E6Q,
};
#define NY0_2D 7
-static __float128 Y0_2D[NY0_2D + 1] = {
+static const __float128 Y0_2D[NY0_2D + 1] = {
1.438972634353286978700329883122253752192E20Q,
1.856409101981569254247700169486907405500E18Q,
1.219693352678218589553725579802986255614E16Q,
@@ -821,22 +822,22 @@ static const __float128 U0 = -7.3804295108687225274343927948483016310862e-02Q;
/* Bessel function of the second kind, order zero. */
__float128
-y0q (__float128 x)
+ y0q(__float128 x)
{
__float128 xx, xinv, z, p, q, c, s, cc, ss;
if (! finiteq (x))
return 1 / (x + x * x);
- if (x <= 0.0Q)
+ if (x <= 0)
{
- if (x < 0.0Q)
+ if (x < 0)
return (zero / (zero * x));
return -1 / zero; /* -inf and divide by zero exception. */
}
xx = fabsq (x);
if (xx <= 0x1p-57)
return U0 + TWOOPI * logq (x);
- if (xx <= 2.0Q)
+ if (xx <= 2)
{
/* 0 <= x <= 2 */
z = xx * xx;
@@ -855,7 +856,7 @@ y0q (__float128 x)
sincosq (x, &s, &c);
ss = s - c;
cc = s + c;
- if (xx <= FLT128_MAX / 2.0Q)
+ if (xx <= FLT128_MAX / 2)
{
z = -cosq (x + x);
if ((s * c) < 0)
@@ -867,7 +868,7 @@ y0q (__float128 x)
if (xx > 0x1p256Q)
return ONEOSQPI * ss / sqrtq (x);
- xinv = 1.0Q / xx;
+ xinv = 1 / xx;
z = xinv * xinv;
if (xinv <= 0.25)
{
@@ -925,7 +926,7 @@ y0q (__float128 x)
q = neval (z, Q2_2r3N, NQ2_2r3N) / deval (z, Q2_2r3D, NQ2_2r3D);
}
}
- p = 1.0Q + z * p;
+ p = 1 + z * p;
q = z * xinv * q;
q = q - 0.125Q * xinv;
z = ONEOSQPI * (p * ss + q * cc) / sqrtq (x);
diff --git a/libquadmath/math/j1q.c b/libquadmath/math/j1q.c
index 5eb705084e2..b18e881276b 100644
--- a/libquadmath/math/j1q.c
+++ b/libquadmath/math/j1q.c
@@ -6,9 +6,9 @@
*
* SYNOPSIS:
*
- * __float128 x, y, j1q();
+ * long double x, y, j1l();
*
- * y = j1q( x );
+ * y = j1l( x );
*
*
*
@@ -52,9 +52,9 @@
*
* SYNOPSIS:
*
- * __float128, y, y1q();
+ * double x, y, y1l();
*
- * y = y1q( x );
+ * y = y1l( x );
*
*
*
@@ -92,17 +92,16 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
-#include <errno.h>
#include "quadmath-imp.h"
/* 1 / sqrt(pi) */
static const __float128 ONEOSQPI = 5.6418958354775628694807945156077258584405E-1Q;
/* 2 / pi */
static const __float128 TWOOPI = 6.3661977236758134307553505349005744813784E-1Q;
-static const __float128 zero = 0.0Q;
+static const __float128 zero = 0;
/* J1(x) = .5x + x x^2 R(x^2)
Peak relative error 1.9e-35
@@ -126,7 +125,7 @@ static const __float128 J0_2D[NJ0_2D + 1] = {
5.673775894803172808323058205986256928794E8Q,
1.080329960080981204840966206372671147224E6Q,
1.411951256636576283942477881535283304912E3Q,
- /* 1.000000000000000000000000000000000000000E0Q */
+ /* 1.000000000000000000000000000000000000000E0L */
};
/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2),
@@ -690,9 +689,9 @@ j1q (__float128 x)
if (x != x)
return x + x;
else
- return 0.0Q;
+ return 0;
}
- if (x == 0.0Q)
+ if (x == 0)
return x;
xx = fabsq (x);
if (xx <= 0x1p-58Q)
@@ -703,7 +702,7 @@ j1q (__float128 x)
errno = ERANGE;
return ret;
}
- if (xx <= 2.0Q)
+ if (xx <= 2)
{
/* 0 <= x <= 2 */
z = xx * xx;
@@ -723,7 +722,7 @@ j1q (__float128 x)
sincosq (xx, &s, &c);
ss = -s - c;
cc = s - c;
- if (xx <= FLT128_MAX / 2.0Q)
+ if (xx <= FLT128_MAX / 2)
{
z = cosq (xx + xx);
if ((s * c) > 0)
@@ -740,7 +739,7 @@ j1q (__float128 x)
return z;
}
- xinv = 1.0Q / xx;
+ xinv = 1 / xx;
z = xinv * xinv;
if (xinv <= 0.25)
{
@@ -798,7 +797,7 @@ j1q (__float128 x)
q = neval (z, Q2_2r3N, NQ2_2r3N) / deval (z, Q2_2r3D, NQ2_2r3D);
}
}
- p = 1.0Q + z * p;
+ p = 1 + z * p;
q = z * q;
q = q * xinv + 0.375Q * xinv;
z = ONEOSQPI * (p * cc - q * ss) / sqrtq (xx);
@@ -808,11 +807,12 @@ j1q (__float128 x)
}
+
/* Y1(x) = 2/pi * (log(x) * J1(x) - 1/x) + x R(x^2)
Peak relative error 6.2e-38
0 <= x <= 2 */
#define NY0_2N 7
-static __float128 Y0_2N[NY0_2N + 1] = {
+static const __float128 Y0_2N[NY0_2N + 1] = {
-6.804415404830253804408698161694720833249E19Q,
1.805450517967019908027153056150465849237E19Q,
-8.065747497063694098810419456383006737312E17Q,
@@ -823,7 +823,7 @@ static __float128 Y0_2N[NY0_2N + 1] = {
9.541172044989995856117187515882879304461E5Q,
};
#define NY0_2D 7
-static __float128 Y0_2D[NY0_2D + 1] = {
+static const __float128 Y0_2D[NY0_2D + 1] = {
3.470629591820267059538637461549677594549E20Q,
4.120796439009916326855848107545425217219E18Q,
2.477653371652018249749350657387030814542E16Q,
@@ -845,9 +845,9 @@ y1q (__float128 x)
if (! finiteq (x))
return 1 / (x + x * x);
- if (x <= 0.0Q)
+ if (x <= 0)
{
- if (x < 0.0Q)
+ if (x < 0)
return (zero / (zero * x));
return -1 / zero; /* -inf and divide by zero exception. */
}
@@ -859,10 +859,10 @@ y1q (__float128 x)
errno = ERANGE;
return z;
}
- if (xx <= 2.0Q)
- {
+ if (xx <= 2)
+ {
/* 0 <= x <= 2 */
- /* FIXME: SET_RESTORE_ROUNDL (FE_TONEAREST); */
+ SET_RESTORE_ROUNDF128 (FE_TONEAREST);
z = xx * xx;
p = xx * neval (z, Y0_2N, NY0_2N) / deval (z, Y0_2D, NY0_2D);
p = -TWOOPI / xx + p;
@@ -879,7 +879,7 @@ y1q (__float128 x)
sincosq (xx, &s, &c);
ss = -s - c;
cc = s - c;
- if (xx <= FLT128_MAX / 2.0Q)
+ if (xx <= FLT128_MAX / 2)
{
z = cosq (xx + xx);
if ((s * c) > 0)
@@ -891,7 +891,7 @@ y1q (__float128 x)
if (xx > 0x1p256Q)
return ONEOSQPI * ss / sqrtq (xx);
- xinv = 1.0Q / xx;
+ xinv = 1 / xx;
z = xinv * xinv;
if (xinv <= 0.25)
{
@@ -949,7 +949,7 @@ y1q (__float128 x)
q = neval (z, Q2_2r3N, NQ2_2r3N) / deval (z, Q2_2r3D, NQ2_2r3D);
}
}
- p = 1.0Q + z * p;
+ p = 1 + z * p;
q = z * q;
q = q * xinv + 0.375Q * xinv;
z = ONEOSQPI * (p * ss + q * cc) / sqrtq (xx);
diff --git a/libquadmath/math/jnq.c b/libquadmath/math/jnq.c
index 56a183604c1..ae318ac36b7 100644
--- a/libquadmath/math/jnq.c
+++ b/libquadmath/math/jnq.c
@@ -27,8 +27,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
/*
* __ieee754_jn(n, x), __ieee754_yn(n, x)
@@ -56,14 +56,13 @@
*
*/
-#include <errno.h>
#include "quadmath-imp.h"
static const __float128
invsqrtpi = 5.6418958354775628694807945156077258584405E-1Q,
- two = 2.0e0Q,
- one = 1.0e0Q,
- zero = 0.0Q;
+ two = 2,
+ one = 1,
+ zero = 0;
__float128
@@ -71,7 +70,7 @@ jnq (int n, __float128 x)
{
uint32_t se;
int32_t i, ix, sgn;
- __float128 a, b, temp, di;
+ __float128 a, b, temp, di, ret;
__float128 z, w;
ieee854_float128 u;
@@ -104,201 +103,213 @@ jnq (int n, __float128 x)
sgn = (n & 1) & (se >> 31); /* even n -- 0, odd n -- sign(x) */
x = fabsq (x);
- if (x == 0.0Q || ix >= 0x7fff0000) /* if x is 0 or inf */
- b = zero;
- else if ((__float128) n <= x)
- {
- /* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */
- if (ix >= 0x412D0000)
- { /* x > 2**302 */
+ {
+ SET_RESTORE_ROUNDF128 (FE_TONEAREST);
+ if (x == 0 || ix >= 0x7fff0000) /* if x is 0 or inf */
+ return sgn == 1 ? -zero : zero;
+ else if ((__float128) n <= x)
+ {
+ /* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */
+ if (ix >= 0x412D0000)
+ { /* x > 2**302 */
- /* ??? Could use an expansion for large x here. */
+ /* ??? Could use an expansion for large x here. */
- /* (x >> n**2)
- * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
- * Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)
- * Let s=sin(x), c=cos(x),
- * xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then
- *
- * n sin(xn)*sqt2 cos(xn)*sqt2
- * ----------------------------------
- * 0 s-c c+s
- * 1 -s-c -c+s
- * 2 -s+c -c-s
- * 3 s+c c-s
- */
- __float128 s;
- __float128 c;
- sincosq (x, &s, &c);
- switch (n & 3)
- {
- case 0:
- temp = c + s;
- break;
- case 1:
- temp = -c + s;
- break;
- case 2:
- temp = -c - s;
- break;
- case 3:
- temp = c - s;
- break;
- }
- b = invsqrtpi * temp / sqrtq (x);
- }
- else
- {
- a = j0q (x);
- b = j1q (x);
- for (i = 1; i < n; i++)
- {
- temp = b;
- b = b * ((__float128) (i + i) / x) - a; /* avoid underflow */
- a = temp;
- }
- }
- }
- else
- {
- if (ix < 0x3fc60000)
- { /* x < 2**-57 */
- /* x is tiny, return the first Taylor expansion of J(n,x)
- * J(n,x) = 1/n!*(x/2)^n - ...
- */
- if (n >= 400) /* underflow, result < 10^-4952 */
- b = zero;
- else
- {
- temp = x * 0.5;
- b = temp;
- for (a = one, i = 2; i <= n; i++)
- {
- a *= (__float128) i; /* a = n! */
- b *= temp; /* b = (x/2)^n */
- }
- b = b / a;
- }
- }
- else
- {
- /* use backward recurrence */
- /* x x^2 x^2
- * J(n,x)/J(n-1,x) = ---- ------ ------ .....
- * 2n - 2(n+1) - 2(n+2)
- *
- * 1 1 1
- * (for large x) = ---- ------ ------ .....
- * 2n 2(n+1) 2(n+2)
- * -- - ------ - ------ -
- * x x x
- *
- * Let w = 2n/x and h=2/x, then the above quotient
- * is equal to the continued fraction:
- * 1
- * = -----------------------
- * 1
- * w - -----------------
- * 1
- * w+h - ---------
- * w+2h - ...
- *
- * To determine how many terms needed, let
- * Q(0) = w, Q(1) = w(w+h) - 1,
- * Q(k) = (w+k*h)*Q(k-1) - Q(k-2),
- * When Q(k) > 1e4 good for single
- * When Q(k) > 1e9 good for double
- * When Q(k) > 1e17 good for quadruple
- */
- /* determine k */
- __float128 t, v;
- __float128 q0, q1, h, tmp;
- int32_t k, m;
- w = (n + n) / (__float128) x;
- h = 2.0Q / (__float128) x;
- q0 = w;
- z = w + h;
- q1 = w * z - 1.0Q;
- k = 1;
- while (q1 < 1.0e17Q)
- {
- k += 1;
- z += h;
- tmp = z * q1 - q0;
- q0 = q1;
- q1 = tmp;
- }
- m = n + n;
- for (t = zero, i = 2 * (n + k); i >= m; i -= 2)
- t = one / (i / x - t);
- a = t;
- b = one;
- /* estimate log((2/x)^n*n!) = n*log(2/x)+n*ln(n)
- * Hence, if n*(log(2n/x)) > ...
- * single 8.8722839355e+01
- * double 7.09782712893383973096e+02
- * __float128 1.1356523406294143949491931077970765006170e+04
- * then recurrent value may overflow and the result is
- * likely underflow to zero
- */
- tmp = n;
- v = two / x;
- tmp = tmp * logq (fabsq (v * tmp));
+ /* (x >> n**2)
+ * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
+ * Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)
+ * Let s=sin(x), c=cos(x),
+ * xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then
+ *
+ * n sin(xn)*sqt2 cos(xn)*sqt2
+ * ----------------------------------
+ * 0 s-c c+s
+ * 1 -s-c -c+s
+ * 2 -s+c -c-s
+ * 3 s+c c-s
+ */
+ __float128 s;
+ __float128 c;
+ sincosq (x, &s, &c);
+ switch (n & 3)
+ {
+ case 0:
+ temp = c + s;
+ break;
+ case 1:
+ temp = -c + s;
+ break;
+ case 2:
+ temp = -c - s;
+ break;
+ case 3:
+ temp = c - s;
+ break;
+ }
+ b = invsqrtpi * temp / sqrtq (x);
+ }
+ else
+ {
+ a = j0q (x);
+ b = j1q (x);
+ for (i = 1; i < n; i++)
+ {
+ temp = b;
+ b = b * ((__float128) (i + i) / x) - a; /* avoid underflow */
+ a = temp;
+ }
+ }
+ }
+ else
+ {
+ if (ix < 0x3fc60000)
+ { /* x < 2**-57 */
+ /* x is tiny, return the first Taylor expansion of J(n,x)
+ * J(n,x) = 1/n!*(x/2)^n - ...
+ */
+ if (n >= 400) /* underflow, result < 10^-4952 */
+ b = zero;
+ else
+ {
+ temp = x * 0.5;
+ b = temp;
+ for (a = one, i = 2; i <= n; i++)
+ {
+ a *= (__float128) i; /* a = n! */
+ b *= temp; /* b = (x/2)^n */
+ }
+ b = b / a;
+ }
+ }
+ else
+ {
+ /* use backward recurrence */
+ /* x x^2 x^2
+ * J(n,x)/J(n-1,x) = ---- ------ ------ .....
+ * 2n - 2(n+1) - 2(n+2)
+ *
+ * 1 1 1
+ * (for large x) = ---- ------ ------ .....
+ * 2n 2(n+1) 2(n+2)
+ * -- - ------ - ------ -
+ * x x x
+ *
+ * Let w = 2n/x and h=2/x, then the above quotient
+ * is equal to the continued fraction:
+ * 1
+ * = -----------------------
+ * 1
+ * w - -----------------
+ * 1
+ * w+h - ---------
+ * w+2h - ...
+ *
+ * To determine how many terms needed, let
+ * Q(0) = w, Q(1) = w(w+h) - 1,
+ * Q(k) = (w+k*h)*Q(k-1) - Q(k-2),
+ * When Q(k) > 1e4 good for single
+ * When Q(k) > 1e9 good for double
+ * When Q(k) > 1e17 good for quadruple
+ */
+ /* determine k */
+ __float128 t, v;
+ __float128 q0, q1, h, tmp;
+ int32_t k, m;
+ w = (n + n) / (__float128) x;
+ h = 2 / (__float128) x;
+ q0 = w;
+ z = w + h;
+ q1 = w * z - 1;
+ k = 1;
+ while (q1 < 1.0e17Q)
+ {
+ k += 1;
+ z += h;
+ tmp = z * q1 - q0;
+ q0 = q1;
+ q1 = tmp;
+ }
+ m = n + n;
+ for (t = zero, i = 2 * (n + k); i >= m; i -= 2)
+ t = one / (i / x - t);
+ a = t;
+ b = one;
+ /* estimate log((2/x)^n*n!) = n*log(2/x)+n*ln(n)
+ * Hence, if n*(log(2n/x)) > ...
+ * single 8.8722839355e+01
+ * double 7.09782712893383973096e+02
+ * long double 1.1356523406294143949491931077970765006170e+04
+ * then recurrent value may overflow and the result is
+ * likely underflow to zero
+ */
+ tmp = n;
+ v = two / x;
+ tmp = tmp * logq (fabsq (v * tmp));
- if (tmp < 1.1356523406294143949491931077970765006170e+04Q)
- {
- for (i = n - 1, di = (__float128) (i + i); i > 0; i--)
- {
- temp = b;
- b *= di;
- b = b / x - a;
- a = temp;
- di -= two;
- }
- }
- else
- {
- for (i = n - 1, di = (__float128) (i + i); i > 0; i--)
- {
- temp = b;
- b *= di;
- b = b / x - a;
- a = temp;
- di -= two;
- /* scale b to avoid spurious overflow */
- if (b > 1e100Q)
- {
- a /= b;
- t /= b;
- b = one;
- }
- }
- }
- /* j0() and j1() suffer enormous loss of precision at and
- * near zero; however, we know that their zero points never
- * coincide, so just choose the one further away from zero.
- */
- z = j0q (x);
- w = j1q (x);
- if (fabsq (z) >= fabsq (w))
- b = (t * z / b);
- else
- b = (t * w / a);
- }
+ if (tmp < 1.1356523406294143949491931077970765006170e+04Q)
+ {
+ for (i = n - 1, di = (__float128) (i + i); i > 0; i--)
+ {
+ temp = b;
+ b *= di;
+ b = b / x - a;
+ a = temp;
+ di -= two;
+ }
+ }
+ else
+ {
+ for (i = n - 1, di = (__float128) (i + i); i > 0; i--)
+ {
+ temp = b;
+ b *= di;
+ b = b / x - a;
+ a = temp;
+ di -= two;
+ /* scale b to avoid spurious overflow */
+ if (b > 1e100Q)
+ {
+ a /= b;
+ t /= b;
+ b = one;
+ }
+ }
+ }
+ /* j0() and j1() suffer enormous loss of precision at and
+ * near zero; however, we know that their zero points never
+ * coincide, so just choose the one further away from zero.
+ */
+ z = j0q (x);
+ w = j1q (x);
+ if (fabsq (z) >= fabsq (w))
+ b = (t * z / b);
+ else
+ b = (t * w / a);
+ }
+ }
+ if (sgn == 1)
+ ret = -b;
+ else
+ ret = b;
+ }
+ if (ret == 0)
+ {
+ ret = copysignq (FLT128_MIN, ret) * FLT128_MIN;
+ errno = ERANGE;
}
- if (sgn == 1)
- return -b;
else
- return b;
+ math_check_force_underflow (ret);
+ return ret;
}
+
__float128
ynq (int n, __float128 x)
{
uint32_t se;
int32_t i, ix;
int32_t sign;
- __float128 a, b, temp;
+ __float128 a, b, temp, ret;
ieee854_float128 u;
u.value = x;
@@ -311,10 +322,10 @@ ynq (int n, __float128 x)
if ((u.words32.w0 & 0xffff) | u.words32.w1 | u.words32.w2 | u.words32.w3)
return x + x;
}
- if (x <= 0.0Q)
+ if (x <= 0)
{
- if (x == 0.0Q)
- return -HUGE_VALQ + x;
+ if (x == 0)
+ return ((n < 0 && (n & 1) != 0) ? 1 : -1) / 0.0Q;
if (se & 0x80000000)
return zero / (zero * x);
}
@@ -326,69 +337,79 @@ ynq (int n, __float128 x)
}
if (n == 0)
return (y0q (x));
- if (n == 1)
- return (sign * y1q (x));
- if (ix >= 0x7fff0000)
- return zero;
- if (ix >= 0x412D0000)
- { /* x > 2**302 */
+ {
+ SET_RESTORE_ROUNDF128 (FE_TONEAREST);
+ if (n == 1)
+ {
+ ret = sign * y1q (x);
+ goto out;
+ }
+ if (ix >= 0x7fff0000)
+ return zero;
+ if (ix >= 0x412D0000)
+ { /* x > 2**302 */
- /* ??? See comment above on the possible futility of this. */
+ /* ??? See comment above on the possible futility of this. */
- /* (x >> n**2)
- * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
- * Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)
- * Let s=sin(x), c=cos(x),
- * xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then
- *
- * n sin(xn)*sqt2 cos(xn)*sqt2
- * ----------------------------------
- * 0 s-c c+s
- * 1 -s-c -c+s
- * 2 -s+c -c-s
- * 3 s+c c-s
- */
- __float128 s;
- __float128 c;
- sincosq (x, &s, &c);
- switch (n & 3)
- {
- case 0:
- temp = s - c;
- break;
- case 1:
- temp = -s - c;
- break;
- case 2:
- temp = -s + c;
- break;
- case 3:
- temp = s + c;
- break;
- }
- b = invsqrtpi * temp / sqrtq (x);
- }
- else
- {
- a = y0q (x);
- b = y1q (x);
- /* quit if b is -inf */
- u.value = b;
- se = u.words32.w0 & 0xffff0000;
- for (i = 1; i < n && se != 0xffff0000; i++)
- {
- temp = b;
- b = ((__float128) (i + i) / x) * b - a;
- u.value = b;
- se = u.words32.w0 & 0xffff0000;
- a = temp;
- }
- }
- /* If B is +-Inf, set up errno accordingly. */
- if (! finiteq (b))
- errno = ERANGE;
- if (sign > 0)
- return b;
- else
- return -b;
+ /* (x >> n**2)
+ * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
+ * Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)
+ * Let s=sin(x), c=cos(x),
+ * xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then
+ *
+ * n sin(xn)*sqt2 cos(xn)*sqt2
+ * ----------------------------------
+ * 0 s-c c+s
+ * 1 -s-c -c+s
+ * 2 -s+c -c-s
+ * 3 s+c c-s
+ */
+ __float128 s;
+ __float128 c;
+ sincosq (x, &s, &c);
+ switch (n & 3)
+ {
+ case 0:
+ temp = s - c;
+ break;
+ case 1:
+ temp = -s - c;
+ break;
+ case 2:
+ temp = -s + c;
+ break;
+ case 3:
+ temp = s + c;
+ break;
+ }
+ b = invsqrtpi * temp / sqrtq (x);
+ }
+ else
+ {
+ a = y0q (x);
+ b = y1q (x);
+ /* quit if b is -inf */
+ u.value = b;
+ se = u.words32.w0 & 0xffff0000;
+ for (i = 1; i < n && se != 0xffff0000; i++)
+ {
+ temp = b;
+ b = ((__float128) (i + i) / x) * b - a;
+ u.value = b;
+ se = u.words32.w0 & 0xffff0000;
+ a = temp;
+ }
+ }
+ /* If B is +-Inf, set up errno accordingly. */
+ if (! finiteq (b))
+ errno = ERANGE;
+ if (sign > 0)
+ ret = b;
+ else
+ ret = -b;
+ }
+ out:
+ if (isinfq (ret))
+ ret = copysignq (FLT128_MAX, ret) * FLT128_MAX;
+ return ret;
}
diff --git a/libquadmath/math/ldexpq.c b/libquadmath/math/ldexpq.c
index c18968b03bc..73e63f1a9ce 100644
--- a/libquadmath/math/ldexpq.c
+++ b/libquadmath/math/ldexpq.c
@@ -1,8 +1,4 @@
-/* ldexpq.c -- __float128 version of s_ldexp.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
+/* @(#)s_ldexp.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -14,14 +10,23 @@
* ====================================================
*/
-#include <errno.h>
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_ldexp.c,v 1.6 1995/05/10 20:47:40 jtc Exp $";
+#endif
+
#include "quadmath-imp.h"
__float128
ldexpq (__float128 value, int exp)
{
- if(!finiteq(value)||value==0.0Q) return value;
- value = scalbnq(value,exp);
- if(!finiteq(value)||value==0.0Q) errno = ERANGE;
- return value;
+ if(!finiteq(value)||value==0) return value + value;
+ value = scalbnq(value,exp);
+ if(!finiteq(value)||value==0) errno = ERANGE;
+ return value;
}
+
+
+
+
+
+/* Note, versioning issues are punted to ldbl-opt in this case. */
diff --git a/libquadmath/math/lgammaq.c b/libquadmath/math/lgammaq.c
index eef62dbc91f..f127fe3ee7e 100644
--- a/libquadmath/math/lgammaq.c
+++ b/libquadmath/math/lgammaq.c
@@ -6,7 +6,7 @@
*
* SYNOPSIS:
*
- * __float128 x, y, lgammal();
+ * long double x, y, lgammal();
* extern int sgngam;
*
* y = lgammal(x);
@@ -18,7 +18,7 @@
* Returns the base e (2.718...) logarithm of the absolute
* value of the gamma function of the argument.
* The sign (+1 or -1) of the gamma function is returned in a
- * global (extern) variable named signgam.
+ * global (extern) variable named sgngam.
*
* The positive domain is partitioned into numerous segments for approximation.
* For x > 10,
@@ -65,20 +65,26 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
-
#ifdef HAVE_MATH_H_SIGNGAM
-#include <math.h> /* For POSIX's extern int signgam. */
+# include <math.h>
+#endif
+__float128
+lgammaq (__float128 x)
+{
+#ifndef HAVE_MATH_H_SIGNGAM
+ int signgam;
#endif
+ return __quadmath_lgammaq_r (x, &signgam);
+}
-static const __float128 PIQ = 3.1415926535897932384626433832795028841972E0Q;
+static const __float128 PIL = 3.1415926535897932384626433832795028841972E0Q;
static const __float128 MAXLGM = 1.0485738685148938358098967157129705071571E4928Q;
-static const __float128 one = 1.0Q;
-static const __float128 zero = 0.0Q;
-static const __float128 huge = 1.0e4000Q;
+static const __float128 one = 1;
+static const __float128 huge = FLT128_MAX;
/* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2)
1/x <= 0.0741 (x >= 13.495...)
@@ -131,7 +137,7 @@ static const __float128 RD13[NRD13 + 1] =
1.178186288833066430952276702931512870676E7Q,
1.519928623743264797939103740132278337476E5Q,
7.989298844938119228411117593338850892311E2Q
- /* 1.0E0Q */
+ /* 1.0E0L */
};
@@ -163,7 +169,7 @@ static const __float128 RD12[NRD12 + 1] =
9.236680081763754597872713592701048455890E6Q,
1.292246897881650919242713651166596478850E5Q,
7.366532445427159272584194816076600211171E2Q
- /* 1.0E0Q */
+ /* 1.0E0L */
};
@@ -195,7 +201,7 @@ static const __float128 RD11[NRD11 + 1] =
7.089478198662651683977290023829391596481E6Q,
1.083246385105903533237139380509590158658E5Q,
6.744420991491385145885727942219463243597E2Q
- /* 1.0E0Q */
+ /* 1.0E0L */
};
@@ -228,7 +234,7 @@ static const __float128 RD10[NRD10 + 1] =
-1.632090155573373286153427982504851867131E8Q,
-1.483575879240631280658077826889223634921E6Q,
-4.002806669713232271615885826373550502510E3Q
- /* 1.0E0Q */
+ /* 1.0E0L */
};
@@ -261,7 +267,7 @@ static const __float128 RD9[NRD9 + 1] =
-1.164573656694603024184768200787835094317E8Q,
-1.177343939483908678474886454113163527909E6Q,
-3.529391059783109732159524500029157638736E3Q
- /* 1.0E0Q */
+ /* 1.0E0L */
};
@@ -295,7 +301,7 @@ static const __float128 RD8[NRD8 + 1] =
5.790862854275238129848491555068073485086E6Q,
9.305213264307921522842678835618803553589E4Q,
6.216974105861848386918949336819572333622E2Q
- /* 1.0E0Q */
+ /* 1.0E0L */
};
@@ -329,7 +335,7 @@ static const __float128 RD7[NRD7 + 1] =
3.845638971184305248268608902030718674691E6Q,
7.081730675423444975703917836972720495507E4Q,
5.423122582741398226693137276201344096370E2Q
- /* 1.0E0Q */
+ /* 1.0E0L */
};
@@ -364,7 +370,7 @@ static const __float128 RD6[NRD6 + 1] =
-6.564058379709759600836745035871373240904E7Q,
-7.861511116647120540275354855221373571536E5Q,
-2.821943442729620524365661338459579270561E3Q
- /* 1.0E0Q */
+ /* 1.0E0L */
};
@@ -400,7 +406,7 @@ static const __float128 RD5[NRD5 + 1] =
2.698552646016599923609773122139463150403E6Q,
5.526516251532464176412113632726150253215E4Q,
4.772343321713697385780533022595450486932E2Q
- /* 1.0E0Q */
+ /* 1.0E0L */
};
@@ -437,7 +443,7 @@ static const __float128 RD4[NRD4 + 1] =
-3.416703082301143192939774401370222822430E7Q,
-4.981791914177103793218433195857635265295E5Q,
-2.192507743896742751483055798411231453733E3Q
- /* 1.0E0Q */
+ /* 1.0E0L */
};
@@ -475,7 +481,7 @@ static const __float128 RD3[NRD3 + 1] =
-1.505316381525727713026364396635522516989E7Q,
-2.856327162923716881454613540575964890347E5Q,
-1.622140448015769906847567212766206894547E3Q
- /* 1.0E0Q */
+ /* 1.0E0L */
};
@@ -509,7 +515,7 @@ static const __float128 RD2r5[NRD2r5 + 1] =
-4.101991193844953082400035444146067511725E6Q,
-1.174082735875715802334430481065526664020E5Q,
-9.932840389994157592102947657277692978511E2Q
- /* 1.0E0Q */
+ /* 1.0E0L */
};
@@ -579,7 +585,7 @@ static const __float128 RD1r75[NRD1r75 + 1] =
-1.201296501404876774861190604303728810836E6Q,
-5.007966406976106636109459072523610273928E4Q,
-6.155817990560743422008969155276229018209E2Q
- /* 1.0E0Q */
+ /* 1.0E0L */
};
@@ -616,7 +622,7 @@ static const __float128 RD1r5[NRD1r5 + 1] =
5.741463295366557346748361781768833633256E4Q,
4.226404539738182992856094681115746692030E3Q,
1.316980975410327975566999780608618774469E2Q,
- /* 1.0E0Q */
+ /* 1.0E0L */
};
@@ -652,7 +658,7 @@ static const __float128 RD1r25[NRD1r25 + 1] =
3.822267399625696880571810137601310855419E4Q,
3.228463206479133236028576845538387620856E3Q,
1.152133170470059555646301189220117965514E2Q
- /* 1.0E0Q */
+ /* 1.0E0L */
};
@@ -758,60 +764,61 @@ deval (__float128 x, const __float128 *p, int n)
__float128
-lgammaq (__float128 x)
+__quadmath_lgammaq_r (__float128 x, int *signgamp)
{
__float128 p, q, w, z, nx;
int i, nn;
-#ifndef HAVE_MATH_H_SIGNGAM
- int signgam;
-#endif
- signgam = 1;
+ *signgamp = 1;
if (! finiteq (x))
return x * x;
- if (x == 0.0Q)
+ if (x == 0)
{
if (signbitq (x))
- signgam = -1;
+ *signgamp = -1;
}
- if (x < 0.0Q)
+ if (x < 0)
{
+ if (x < -2 && x > -50)
+ return __quadmath_lgamma_negq (x, signgamp);
q = -x;
p = floorq (q);
if (p == q)
- return (one / (p - p));
- i = p;
- if ((i & 1) == 0)
- signgam = -1;
+ return (one / fabsq (p - p));
+ __float128 halfp = p * 0.5Q;
+ if (halfp == floorq (halfp))
+ *signgamp = -1;
else
- signgam = 1;
+ *signgamp = 1;
+ if (q < 0x1p-120Q)
+ return -logq (q);
z = q - p;
if (z > 0.5Q)
{
- p += 1.0Q;
+ p += 1;
z = p - q;
}
- z = q * sinq (PIQ * z);
- if (z == 0.0Q)
- return (signgam * huge * huge);
- w = lgammaq (q);
- z = logq (PIQ / z) - w;
+ z = q * sinq (PIL * z);
+ w = __quadmath_lgammaq_r (q, &i);
+ z = logq (PIL / z) - w;
return (z);
}
if (x < 13.5Q)
{
- p = 0.0Q;
+ p = 0;
nx = floorq (x + 0.5Q);
nn = nx;
switch (nn)
{
case 0:
/* log gamma (x + 1) = log(x) + log gamma(x) */
- if (x <= 0.125)
+ if (x < 0x1p-120Q)
+ return -logq (x);
+ else if (x <= 0.125)
{
p = x * neval (x, RN1, NRN1) / deval (x, RD1, NRD1);
}
@@ -824,7 +831,7 @@ lgammaq (__float128 x)
}
else if (x <= 0.625)
{
- z = x + (1.0Q - x0a);
+ z = x + (1 - x0a);
z = z - x0b;
p = neval (z, RN1r5, NRN1r5) / deval (z, RD1r5, NRD1r5);
p = p * z * z;
@@ -840,7 +847,7 @@ lgammaq (__float128 x)
}
else
{
- z = x - 1.0Q;
+ z = x - 1;
p = z * neval (z, RN2, NRN2) / deval (z, RD2, NRD2);
}
p = p - logq (x);
@@ -851,7 +858,7 @@ lgammaq (__float128 x)
{
if (x <= 0.625)
{
- z = x + (1.0Q - x0a);
+ z = x + (1 - x0a);
z = z - x0b;
p = neval (z, RN1r5, NRN1r5) / deval (z, RD1r5, NRD1r5);
p = p * z * z;
@@ -868,21 +875,21 @@ lgammaq (__float128 x)
}
else
{
- z = x - 1.0Q;
+ z = x - 1;
p = z * neval (z, RN2, NRN2) / deval (z, RD2, NRD2);
}
p = p - logq (x);
}
- else if (x < 1.0Q)
+ else if (x < 1)
{
- z = x - 1.0Q;
+ z = x - 1;
p = z * neval (z, RNr9, NRNr9) / deval (z, RDr9, NRDr9);
}
- else if (x == 1.0Q)
- p = 0.0Q;
+ else if (x == 1)
+ p = 0;
else if (x <= 1.125Q)
{
- z = x - 1.0Q;
+ z = x - 1;
p = z * neval (z, RN1, NRN1) / deval (z, RD1, NRD1);
}
else if (x <= 1.375)
@@ -921,11 +928,11 @@ lgammaq (__float128 x)
p += lgam1r75b;
p += lgam1r75a;
}
- else if (x == 2.0Q)
- p = 0.0Q;
+ else if (x == 2)
+ p = 0;
else if (x < 2.375Q)
{
- z = x - 2.0Q;
+ z = x - 2;
p = z * neval (z, RN2, NRN2) / deval (z, RD2, NRD2);
}
else
@@ -947,7 +954,7 @@ lgammaq (__float128 x)
}
else
{
- z = x - 3.0Q;
+ z = x - 3;
p = z * neval (z, RN3, NRN3) / deval (z, RD3, NRD3);
p += lgam3b;
p += lgam3a;
@@ -955,70 +962,70 @@ lgammaq (__float128 x)
break;
case 4:
- z = x - 4.0Q;
+ z = x - 4;
p = z * neval (z, RN4, NRN4) / deval (z, RD4, NRD4);
p += lgam4b;
p += lgam4a;
break;
case 5:
- z = x - 5.0Q;
+ z = x - 5;
p = z * neval (z, RN5, NRN5) / deval (z, RD5, NRD5);
p += lgam5b;
p += lgam5a;
break;
case 6:
- z = x - 6.0Q;
+ z = x - 6;
p = z * neval (z, RN6, NRN6) / deval (z, RD6, NRD6);
p += lgam6b;
p += lgam6a;
break;
case 7:
- z = x - 7.0Q;
+ z = x - 7;
p = z * neval (z, RN7, NRN7) / deval (z, RD7, NRD7);
p += lgam7b;
p += lgam7a;
break;
case 8:
- z = x - 8.0Q;
+ z = x - 8;
p = z * neval (z, RN8, NRN8) / deval (z, RD8, NRD8);
p += lgam8b;
p += lgam8a;
break;
case 9:
- z = x - 9.0Q;
+ z = x - 9;
p = z * neval (z, RN9, NRN9) / deval (z, RD9, NRD9);
p += lgam9b;
p += lgam9a;
break;
case 10:
- z = x - 10.0Q;
+ z = x - 10;
p = z * neval (z, RN10, NRN10) / deval (z, RD10, NRD10);
p += lgam10b;
p += lgam10a;
break;
case 11:
- z = x - 11.0Q;
+ z = x - 11;
p = z * neval (z, RN11, NRN11) / deval (z, RD11, NRD11);
p += lgam11b;
p += lgam11a;
break;
case 12:
- z = x - 12.0Q;
+ z = x - 12;
p = z * neval (z, RN12, NRN12) / deval (z, RD12, NRD12);
p += lgam12b;
p += lgam12a;
break;
case 13:
- z = x - 13.0Q;
+ z = x - 13;
p = z * neval (z, RN13, NRN13) / deval (z, RD13, NRD13);
p += lgam13b;
p += lgam13a;
@@ -1028,14 +1035,16 @@ lgammaq (__float128 x)
}
if (x > MAXLGM)
- return (signgam * huge * huge);
+ return (*signgamp * huge * huge);
+ if (x > 0x1p120Q)
+ return x * (logq (x) - 1);
q = ls2pi - x;
q = (x - 0.5Q) * logq (x) + q;
if (x > 1.0e18Q)
return (q);
- p = 1.0Q / (x * x);
+ p = 1 / (x * x);
q += neval (p, RASY, NRASY) / x;
return (q);
}
diff --git a/libquadmath/math/lgammaq_neg.c b/libquadmath/math/lgammaq_neg.c
new file mode 100644
index 00000000000..227d529aa97
--- /dev/null
+++ b/libquadmath/math/lgammaq_neg.c
@@ -0,0 +1,549 @@
+/* lgammal expanding around zeros.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "quadmath-imp.h"
+
+static const __float128 lgamma_zeros[][2] =
+ {
+ { -0x2.74ff92c01f0d82abec9f315f1a08p+0Q, 0xe.d3ccb7fb2658634a2b9f6b2ba81p-116Q },
+ { -0x2.bf6821437b20197995a4b4641eaep+0Q, -0xb.f4b00b4829f961e428533e6ad048p-116Q },
+ { -0x3.24c1b793cb35efb8be699ad3d9bap+0Q, -0x6.5454cb7fac60e3f16d9d7840c2ep-116Q },
+ { -0x3.f48e2a8f85fca170d4561291236cp+0Q, -0xc.320a4887d1cb4c711828a75d5758p-116Q },
+ { -0x4.0a139e16656030c39f0b0de18114p+0Q, 0x1.53e84029416e1242006b2b3d1cfp-112Q },
+ { -0x4.fdd5de9bbabf3510d0aa40769884p+0Q, -0x1.01d7d78125286f78d1e501f14966p-112Q },
+ { -0x5.021a95fc2db6432a4c56e595394cp+0Q, -0x1.ecc6af0430d4fe5746fa7233356fp-112Q },
+ { -0x5.ffa4bd647d0357dd4ed62cbd31ecp+0Q, -0x1.f8e3f8e5deba2d67dbd70dd96ce1p-112Q },
+ { -0x6.005ac9625f233b607c2d96d16384p+0Q, -0x1.cb86ac569340cf1e5f24df7aab7bp-112Q },
+ { -0x6.fff2fddae1bbff3d626b65c23fd4p+0Q, 0x1.e0bfcff5c457ebcf4d3ad9674167p-112Q },
+ { -0x7.000cff7b7f87adf4482dcdb98784p+0Q, 0x1.54d99e35a74d6407b80292df199fp-112Q },
+ { -0x7.fffe5fe05673c3ca9e82b522b0ccp+0Q, 0x1.62d177c832e0eb42c2faffd1b145p-112Q },
+ { -0x8.0001a01459fc9f60cb3cec1cec88p+0Q, 0x2.8998835ac7277f7bcef67c47f188p-112Q },
+ { -0x8.ffffd1c425e80ffc864e95749258p+0Q, -0x1.e7e20210e7f81cf781b44e9d2b02p-112Q },
+ { -0x9.00002e3bb47d86d6d843fedc352p+0Q, 0x2.14852f613a16291751d2ab751f7ep-112Q },
+ { -0x9.fffffb606bdfdcd062ae77a50548p+0Q, 0x3.962d1490cc2e8f031c7007eaa1ap-116Q },
+ { -0xa.0000049f93bb9927b45d95e1544p+0Q, -0x1.e03086db9146a9287bd4f2172d5ap-112Q },
+ { -0xa.ffffff9466e9f1b36dacd2adbd18p+0Q, -0xd.05a4e458062f3f95345a4d9c9b6p-116Q },
+ { -0xb.0000006b9915315d965a6ffea41p+0Q, 0x1.b415c6fff233e7b7fdc3a094246fp-112Q },
+ { -0xb.fffffff7089387387de41acc3d4p+0Q, 0x3.687427c6373bd74a10306e10a28ep-112Q },
+ { -0xc.00000008f76c7731567c0f0250fp+0Q, -0x3.87920df5675833859190eb128ef6p-112Q },
+ { -0xc.ffffffff4f6dcf617f97a5ffc758p+0Q, 0x2.ab72d76f32eaee2d1a42ed515d3ap-116Q },
+ { -0xd.00000000b092309c06683dd1b9p+0Q, -0x3.e3700857a15c19ac5a611de9688ap-112Q },
+ { -0xd.fffffffff36345ab9e184a3e09dp+0Q, -0x1.176dc48e47f62d917973dd44e553p-112Q },
+ { -0xe.000000000c9cba545e94e75ec57p+0Q, -0x1.8f753e2501e757a17cf2ecbeeb89p-112Q },
+ { -0xe.ffffffffff28c060c6604ef3037p+0Q, -0x1.f89d37357c9e3dc17c6c6e63becap-112Q },
+ { -0xf.0000000000d73f9f399bd0e420f8p+0Q, -0x5.e9ee31b0b890744fc0e3fbc01048p-116Q },
+ { -0xf.fffffffffff28c060c6621f512e8p+0Q, 0xd.1b2eec9d960bd9adc5be5f5fa5p-116Q },
+ { -0x1.000000000000d73f9f399da1424cp+4Q, 0x6.c46e0e88305d2800f0e414c506a8p-116Q },
+ { -0x1.0ffffffffffff3569c47e7a93e1cp+4Q, -0x4.6a08a2e008a998ebabb8087efa2cp-112Q },
+ { -0x1.1000000000000ca963b818568887p+4Q, -0x6.ca5a3a64ec15db0a95caf2c9ffb4p-112Q },
+ { -0x1.1fffffffffffff4bec3ce234132dp+4Q, -0x8.b2b726187c841cb92cd5221e444p-116Q },
+ { -0x1.20000000000000b413c31dcbeca5p+4Q, 0x3.c4d005344b6cd0e7231120294abcp-112Q },
+ { -0x1.2ffffffffffffff685b25cbf5f54p+4Q, -0x5.ced932e38485f7dd296b8fa41448p-112Q },
+ { -0x1.30000000000000097a4da340a0acp+4Q, 0x7.e484e0e0ffe38d406ebebe112f88p-112Q },
+ { -0x1.3fffffffffffffff86af516ff7f7p+4Q, -0x6.bd67e720d57854502b7db75e1718p-112Q },
+ { -0x1.40000000000000007950ae900809p+4Q, 0x6.bec33375cac025d9c073168c5d9p-112Q },
+ { -0x1.4ffffffffffffffffa391c4248c3p+4Q, 0x5.c63022b62b5484ba346524db607p-112Q },
+ { -0x1.500000000000000005c6e3bdb73dp+4Q, -0x5.c62f55ed5322b2685c5e9a51e6a8p-112Q },
+ { -0x1.5fffffffffffffffffbcc71a492p+4Q, -0x1.eb5aeb96c74d7ad25e060528fb5p-112Q },
+ { -0x1.6000000000000000004338e5b6ep+4Q, 0x1.eb5aec04b2f2eb663e4e3d8a018cp-112Q },
+ { -0x1.6ffffffffffffffffffd13c97d9dp+4Q, -0x3.8fcc4d08d6fe5aa56ab04307ce7ep-112Q },
+ { -0x1.70000000000000000002ec368263p+4Q, 0x3.8fcc4d090cee2f5d0b69a99c353cp-112Q },
+ { -0x1.7fffffffffffffffffffe0d30fe7p+4Q, 0x7.2f577cca4b4c8cb1dc14001ac5ecp-112Q },
+ { -0x1.800000000000000000001f2cf019p+4Q, -0x7.2f577cca4b3442e35f0040b3b9e8p-112Q },
+ { -0x1.8ffffffffffffffffffffec0c332p+4Q, -0x2.e9a0572b1bb5b95f346a92d67a6p-112Q },
+ { -0x1.90000000000000000000013f3ccep+4Q, 0x2.e9a0572b1bb5c371ddb3561705ap-112Q },
+ { -0x1.9ffffffffffffffffffffff3b8bdp+4Q, -0x1.cad8d32e386fd783e97296d63dcbp-116Q },
+ { -0x1.a0000000000000000000000c4743p+4Q, 0x1.cad8d32e386fd7c1ab8c1fe34c0ep-116Q },
+ { -0x1.afffffffffffffffffffffff8b95p+4Q, -0x3.8f48cc5737d5979c39db806c5406p-112Q },
+ { -0x1.b00000000000000000000000746bp+4Q, 0x3.8f48cc5737d5979c3b3a6bda06f6p-112Q },
+ { -0x1.bffffffffffffffffffffffffbd8p+4Q, 0x6.2898d42174dcf171470d8c8c6028p-112Q },
+ { -0x1.c000000000000000000000000428p+4Q, -0x6.2898d42174dcf171470d18ba412cp-112Q },
+ { -0x1.cfffffffffffffffffffffffffdbp+4Q, -0x4.c0ce9794ea50a839e311320bde94p-112Q },
+ { -0x1.d000000000000000000000000025p+4Q, 0x4.c0ce9794ea50a839e311322f7cf8p-112Q },
+ { -0x1.dfffffffffffffffffffffffffffp+4Q, 0x3.932c5047d60e60caded4c298a174p-112Q },
+ { -0x1.e000000000000000000000000001p+4Q, -0x3.932c5047d60e60caded4c298973ap-112Q },
+ { -0x1.fp+4Q, 0xa.1a6973c1fade2170f7237d35fe3p-116Q },
+ { -0x1.fp+4Q, -0xa.1a6973c1fade2170f7237d35fe08p-116Q },
+ { -0x2p+4Q, 0x5.0d34b9e0fd6f10b87b91be9aff1p-120Q },
+ { -0x2p+4Q, -0x5.0d34b9e0fd6f10b87b91be9aff0cp-120Q },
+ { -0x2.1p+4Q, 0x2.73024a9ba1aa36a7059bff52e844p-124Q },
+ { -0x2.1p+4Q, -0x2.73024a9ba1aa36a7059bff52e844p-124Q },
+ { -0x2.2p+4Q, 0x1.2710231c0fd7a13f8a2b4af9d6b7p-128Q },
+ { -0x2.2p+4Q, -0x1.2710231c0fd7a13f8a2b4af9d6b7p-128Q },
+ { -0x2.3p+4Q, 0x8.6e2ce38b6c8f9419e3fad3f0312p-136Q },
+ { -0x2.3p+4Q, -0x8.6e2ce38b6c8f9419e3fad3f0312p-136Q },
+ { -0x2.4p+4Q, 0x3.bf30652185952560d71a254e4eb8p-140Q },
+ { -0x2.4p+4Q, -0x3.bf30652185952560d71a254e4eb8p-140Q },
+ { -0x2.5p+4Q, 0x1.9ec8d1c94e85af4c78b15c3d89d3p-144Q },
+ { -0x2.5p+4Q, -0x1.9ec8d1c94e85af4c78b15c3d89d3p-144Q },
+ { -0x2.6p+4Q, 0xa.ea565ce061d57489e9b85276274p-152Q },
+ { -0x2.6p+4Q, -0xa.ea565ce061d57489e9b85276274p-152Q },
+ { -0x2.7p+4Q, 0x4.7a6512692eb37804111dabad30ecp-156Q },
+ { -0x2.7p+4Q, -0x4.7a6512692eb37804111dabad30ecp-156Q },
+ { -0x2.8p+4Q, 0x1.ca8ed42a12ae3001a07244abad2bp-160Q },
+ { -0x2.8p+4Q, -0x1.ca8ed42a12ae3001a07244abad2bp-160Q },
+ { -0x2.9p+4Q, 0xb.2f30e1ce812063f12e7e8d8d96e8p-168Q },
+ { -0x2.9p+4Q, -0xb.2f30e1ce812063f12e7e8d8d96e8p-168Q },
+ { -0x2.ap+4Q, 0x4.42bd49d4c37a0db136489772e428p-172Q },
+ { -0x2.ap+4Q, -0x4.42bd49d4c37a0db136489772e428p-172Q },
+ { -0x2.bp+4Q, 0x1.95db45257e5122dcbae56def372p-176Q },
+ { -0x2.bp+4Q, -0x1.95db45257e5122dcbae56def372p-176Q },
+ { -0x2.cp+4Q, 0x9.3958d81ff63527ecf993f3fb6f48p-184Q },
+ { -0x2.cp+4Q, -0x9.3958d81ff63527ecf993f3fb6f48p-184Q },
+ { -0x2.dp+4Q, 0x3.47970e4440c8f1c058bd238c9958p-188Q },
+ { -0x2.dp+4Q, -0x3.47970e4440c8f1c058bd238c9958p-188Q },
+ { -0x2.ep+4Q, 0x1.240804f65951062ca46e4f25c608p-192Q },
+ { -0x2.ep+4Q, -0x1.240804f65951062ca46e4f25c608p-192Q },
+ { -0x2.fp+4Q, 0x6.36a382849fae6de2d15362d8a394p-200Q },
+ { -0x2.fp+4Q, -0x6.36a382849fae6de2d15362d8a394p-200Q },
+ { -0x3p+4Q, 0x2.123680d6dfe4cf4b9b1bcb9d8bdcp-204Q },
+ { -0x3p+4Q, -0x2.123680d6dfe4cf4b9b1bcb9d8bdcp-204Q },
+ { -0x3.1p+4Q, 0xa.d21786ff5842eca51fea0870919p-212Q },
+ { -0x3.1p+4Q, -0xa.d21786ff5842eca51fea0870919p-212Q },
+ { -0x3.2p+4Q, 0x3.766dedc259af040be140a68a6c04p-216Q },
+ };
+
+static const __float128 e_hi = 0x2.b7e151628aed2a6abf7158809cf4p+0Q;
+static const __float128 e_lo = 0xf.3c762e7160f38b4da56a784d9048p-116Q;
+
+
+/* Coefficients B_2k / 2k(2k-1) of x^-(2k-1) in Stirling's
+ approximation to lgamma function. */
+
+static const __float128 lgamma_coeff[] =
+ {
+ 0x1.5555555555555555555555555555p-4Q,
+ -0xb.60b60b60b60b60b60b60b60b60b8p-12Q,
+ 0x3.4034034034034034034034034034p-12Q,
+ -0x2.7027027027027027027027027028p-12Q,
+ 0x3.72a3c5631fe46ae1d4e700dca8f2p-12Q,
+ -0x7.daac36664f1f207daac36664f1f4p-12Q,
+ 0x1.a41a41a41a41a41a41a41a41a41ap-8Q,
+ -0x7.90a1b2c3d4e5f708192a3b4c5d7p-8Q,
+ 0x2.dfd2c703c0cfff430edfd2c703cp-4Q,
+ -0x1.6476701181f39edbdb9ce625987dp+0Q,
+ 0xd.672219167002d3a7a9c886459cp+0Q,
+ -0x9.cd9292e6660d55b3f712eb9e07c8p+4Q,
+ 0x8.911a740da740da740da740da741p+8Q,
+ -0x8.d0cc570e255bf59ff6eec24b49p+12Q,
+ 0xa.8d1044d3708d1c219ee4fdc446ap+16Q,
+ -0xe.8844d8a169abbc406169abbc406p+20Q,
+ 0x1.6d29a0f6433b79890cede62433b8p+28Q,
+ -0x2.88a233b3c8cddaba9809357125d8p+32Q,
+ 0x5.0dde6f27500939a85c40939a85c4p+36Q,
+ -0xb.4005bde03d4642a243581714af68p+40Q,
+ 0x1.bc8cd6f8f1f755c78753cdb5d5c9p+48Q,
+ -0x4.bbebb143bb94de5a0284fa7ec424p+52Q,
+ 0xe.2e1337f5af0bed90b6b0a352d4fp+56Q,
+ -0x2.e78250162b62405ad3e4bfe61b38p+64Q,
+ 0xa.5f7eef9e71ac7c80326ab4cc8bfp+68Q,
+ -0x2.83be0395e550213369924971b21ap+76Q,
+ 0xa.8ebfe48da17dd999790760b0cep+80Q,
+ };
+
+#define NCOEFF (sizeof (lgamma_coeff) / sizeof (lgamma_coeff[0]))
+
+/* Polynomial approximations to (|gamma(x)|-1)(x-n)/(x-x0), where n is
+ the integer end-point of the half-integer interval containing x and
+ x0 is the zero of lgamma in that half-integer interval. Each
+ polynomial is expressed in terms of x-xm, where xm is the midpoint
+ of the interval for which the polynomial applies. */
+
+static const __float128 poly_coeff[] =
+ {
+ /* Interval [-2.125, -2] (polynomial degree 23). */
+ -0x1.0b71c5c54d42eb6c17f30b7aa8f5p+0Q,
+ -0xc.73a1dc05f34951602554c6d7506p-4Q,
+ -0x1.ec841408528b51473e6c425ee5ffp-4Q,
+ -0xe.37c9da26fc3c9a3c1844c8c7f1cp-4Q,
+ -0x1.03cd87c519305703b021fa33f827p-4Q,
+ -0xe.ae9ada65e09aa7f1c75216128f58p-4Q,
+ 0x9.b11855a4864b5731cf85736015a8p-8Q,
+ -0xe.f28c133e697a95c28607c9701dep-4Q,
+ 0x2.6ec14a1c586a72a7cc33ee569d6ap-4Q,
+ -0xf.57cab973e14464a262fc24723c38p-4Q,
+ 0x4.5b0fc25f16e52997b2886bbae808p-4Q,
+ -0xf.f50e59f1a9b56e76e988dac9ccf8p-4Q,
+ 0x6.5f5eae15e9a93369e1d85146c6fcp-4Q,
+ -0x1.0d2422daac459e33e0994325ed23p+0Q,
+ 0x8.82000a0e7401fb1117a0e6606928p-4Q,
+ -0x1.1f492f178a3f1b19f58a2ca68e55p+0Q,
+ 0xa.cb545f949899a04c160b19389abp-4Q,
+ -0x1.36165a1b155ba3db3d1b77caf498p+0Q,
+ 0xd.44c5d5576f74302e5cf79e183eep-4Q,
+ -0x1.51f22e0cdd33d3d481e326c02f3ep+0Q,
+ 0xf.f73a349c08244ac389c007779bfp-4Q,
+ -0x1.73317bf626156ba716747c4ca866p+0Q,
+ 0x1.379c3c97b9bc71e1c1c4802dd657p+0Q,
+ -0x1.a72a351c54f902d483052000f5dfp+0Q,
+ /* Interval [-2.25, -2.125] (polynomial degree 24). */
+ -0xf.2930890d7d675a80c36afb0fd5e8p-4Q,
+ -0xc.a5cfde054eab5c6770daeca577f8p-4Q,
+ 0x3.9c9e0fdebb07cdf89c61d41c9238p-4Q,
+ -0x1.02a5ad35605fcf4af65a6dbacb84p+0Q,
+ 0x9.6e9b1185bb48be9de1918e00a2e8p-4Q,
+ -0x1.4d8332f3cfbfa116fd611e9ce90dp+0Q,
+ 0x1.1c0c8cb4d9f4b1d490e1a41fae4dp+0Q,
+ -0x1.c9a6f5ae9130cd0299e293a42714p+0Q,
+ 0x1.d7e9307fd58a2ea997f29573a112p+0Q,
+ -0x2.921cb3473d96178ca2a11d2a8d46p+0Q,
+ 0x2.e8d59113b6f3409ff8db226e9988p+0Q,
+ -0x3.cbab931625a1ae2b26756817f264p+0Q,
+ 0x4.7d9f0f05d5296d18663ca003912p+0Q,
+ -0x5.ade9cba12a14ea485667b7135bbp+0Q,
+ 0x6.dc983a5da74fb48e767b7fec0a3p+0Q,
+ -0x8.8d9ed454ae31d9e138dd8ee0d1a8p+0Q,
+ 0xa.6fa099d4e7c202e0c0fd6ed8492p+0Q,
+ -0xc.ebc552a8090a0f0115e92d4ebbc8p+0Q,
+ 0xf.d695e4772c0d829b53fba9ca5568p+0Q,
+ -0x1.38c32ae38e5e9eb79b2a4c5570a9p+4Q,
+ 0x1.8035145646cfab49306d0999a51bp+4Q,
+ -0x1.d930adbb03dd342a4c2a8c4e1af6p+4Q,
+ 0x2.45c2edb1b4943ddb3686cd9c6524p+4Q,
+ -0x2.e818ebbfafe2f916fa21abf7756p+4Q,
+ 0x3.9804ce51d0fb9a430a711fd7307p+4Q,
+ /* Interval [-2.375, -2.25] (polynomial degree 25). */
+ -0xd.7d28d505d6181218a25f31d5e45p-4Q,
+ -0xe.69649a3040985140cdf946829fap-4Q,
+ 0xb.0d74a2827d053a8d44595012484p-4Q,
+ -0x1.924b0922853617cac181afbc08ddp+0Q,
+ 0x1.d49b12bccf0a568582e2d3c410f3p+0Q,
+ -0x3.0898bb7d8c4093e636279c791244p+0Q,
+ 0x4.207a6cac711cb53868e8a5057eep+0Q,
+ -0x6.39ee63ea4fb1dcab0c9144bf3ddcp+0Q,
+ 0x8.e2e2556a797b649bf3f53bd26718p+0Q,
+ -0xd.0e83ac82552ef12af508589e7a8p+0Q,
+ 0x1.2e4525e0ce6670563c6484a82b05p+4Q,
+ -0x1.b8e350d6a8f2b222fa390a57c23dp+4Q,
+ 0x2.805cd69b919087d8a80295892c2cp+4Q,
+ -0x3.a42585424a1b7e64c71743ab014p+4Q,
+ 0x5.4b4f409f98de49f7bfb03c05f984p+4Q,
+ -0x7.b3c5827fbe934bc820d6832fb9fcp+4Q,
+ 0xb.33b7b90cc96c425526e0d0866e7p+4Q,
+ -0x1.04b77047ac4f59ee3775ca10df0dp+8Q,
+ 0x1.7b366f5e94a34f41386eac086313p+8Q,
+ -0x2.2797338429385c9849ca6355bfc2p+8Q,
+ 0x3.225273cf92a27c9aac1b35511256p+8Q,
+ -0x4.8f078aa48afe6cb3a4e89690f898p+8Q,
+ 0x6.9f311d7b6654fc1d0b5195141d04p+8Q,
+ -0x9.a0c297b6b4621619ca9bacc48ed8p+8Q,
+ 0xe.ce1f06b6f90d92138232a76e4cap+8Q,
+ -0x1.5b0e6806fa064daf011613e43b17p+12Q,
+ /* Interval [-2.5, -2.375] (polynomial degree 27). */
+ -0xb.74ea1bcfff94b2c01afba9daa7d8p-4Q,
+ -0x1.2a82bd590c37538cab143308de4dp+0Q,
+ 0x1.88020f828b966fec66b8649fd6fcp+0Q,
+ -0x3.32279f040eb694970e9db24863dcp+0Q,
+ 0x5.57ac82517767e68a721005853864p+0Q,
+ -0x9.c2aedcfe22833de43834a0a6cc4p+0Q,
+ 0x1.12c132f1f5577f99e1a0ed3538e1p+4Q,
+ -0x1.ea94e26628a3de3597f7bb55a948p+4Q,
+ 0x3.66b4ac4fa582f58b59f96b2f7c7p+4Q,
+ -0x6.0cf746a9cf4cba8c39afcc73fc84p+4Q,
+ 0xa.c102ef2c20d75a342197df7fedf8p+4Q,
+ -0x1.31ebff06e8f14626782df58db3b6p+8Q,
+ 0x2.1fd6f0c0e710994e059b9dbdb1fep+8Q,
+ -0x3.c6d76040407f447f8b5074f07706p+8Q,
+ 0x6.b6d18e0d8feb4c2ef5af6a40ed18p+8Q,
+ -0xb.efaf542c529f91e34217f24ae6a8p+8Q,
+ 0x1.53852d873210e7070f5d9eb2296p+12Q,
+ -0x2.5b977c0ddc6d540717173ac29fc8p+12Q,
+ 0x4.310d452ae05100eff1e02343a724p+12Q,
+ -0x7.73a5d8f20c4f986a7dd1912b2968p+12Q,
+ 0xd.3f5ea2484f3fca15eab1f4d1a218p+12Q,
+ -0x1.78d18aac156d1d93a2ffe7e08d3fp+16Q,
+ 0x2.9df49ca75e5b567f5ea3e47106cp+16Q,
+ -0x4.a7149af8961a08aa7c3233b5bb94p+16Q,
+ 0x8.3db10ffa742c707c25197d989798p+16Q,
+ -0xe.a26d6dd023cadd02041a049ec368p+16Q,
+ 0x1.c825d90514e7c57c7fa5316f947cp+20Q,
+ -0x3.34bb81e5a0952df8ca1abdc6684cp+20Q,
+ /* Interval [-2.625, -2.5] (polynomial degree 28). */
+ -0x3.d10108c27ebafad533c20eac32bp-4Q,
+ 0x1.cd557caff7d2b2085f41dbec5106p+0Q,
+ 0x3.819b4856d399520dad9776ea2cacp+0Q,
+ 0x6.8505cbad03dc34c5e42e8b12eb78p+0Q,
+ 0xb.c1b2e653a9e38f82b399c94e7f08p+0Q,
+ 0x1.50a53a38f148138105124df65419p+4Q,
+ 0x2.57ae00cbe5232cbeeed34d89727ap+4Q,
+ 0x4.2b156301b8604db85a601544bfp+4Q,
+ 0x7.6989ed23ca3ca7579b3462592b5cp+4Q,
+ 0xd.2dd2976557939517f831f5552cc8p+4Q,
+ 0x1.76e1c3430eb860969bce40cd494p+8Q,
+ 0x2.9a77bf5488742466db3a2c7c1ec6p+8Q,
+ 0x4.a0d62ed7266e8eb36f725a8ebcep+8Q,
+ 0x8.3a6184dd3021067df2f8b91e99c8p+8Q,
+ 0xe.a0ade1538245bf55d39d7e436b1p+8Q,
+ 0x1.a01359fae8617b5826dd74428e9p+12Q,
+ 0x2.e3b0a32caae77251169acaca1ad4p+12Q,
+ 0x5.2301257c81589f62b38fb5993ee8p+12Q,
+ 0x9.21c9275db253d4e719b73b18cb9p+12Q,
+ 0x1.03c104bc96141cda3f3fa4b112bcp+16Q,
+ 0x1.cdc8ed65119196a08b0c78f1445p+16Q,
+ 0x3.34f31d2eaacf34382cdb0073572ap+16Q,
+ 0x5.b37628cadf12bf0000907d0ef294p+16Q,
+ 0xa.22d8b332c0b1e6a616f425dfe5ap+16Q,
+ 0x1.205b01444804c3ff922cd78b4c42p+20Q,
+ 0x1.fe8f0cea9d1e0ff25be2470b4318p+20Q,
+ 0x3.8872aebeb368399aee02b39340aep+20Q,
+ 0x6.ebd560d351e84e26a4381f5b293cp+20Q,
+ 0xc.c3644d094b0dae2fbcbf682cd428p+20Q,
+ /* Interval [-2.75, -2.625] (polynomial degree 26). */
+ -0x6.b5d252a56e8a75458a27ed1c2dd4p-4Q,
+ 0x1.28d60383da3ac721aed3c5794da9p+0Q,
+ 0x1.db6513ada8a66ea77d87d9a8827bp+0Q,
+ 0x2.e217118f9d348a27f7506a707e6ep+0Q,
+ 0x4.450112c5cbf725a0fb9802396c9p+0Q,
+ 0x6.4af99151eae7810a75df2a0303c4p+0Q,
+ 0x9.2db598b4a97a7f69aeef32aec758p+0Q,
+ 0xd.62bef9c22471f5ee47ea1b9c0b5p+0Q,
+ 0x1.379f294e412bd62328326d4222f9p+4Q,
+ 0x1.c5827349d8865f1e8825c37c31c6p+4Q,
+ 0x2.93a7e7a75b7568cc8cbe8c016c12p+4Q,
+ 0x3.bf9bb882afe57edb383d41879d3ap+4Q,
+ 0x5.73c737828cee095c43a5566731c8p+4Q,
+ 0x7.ee4653493a7f81e0442062b3823cp+4Q,
+ 0xb.891c6b83fc8b55bd973b5d962d6p+4Q,
+ 0x1.0c775d7de3bf9b246c0208e0207ep+8Q,
+ 0x1.867ee43ec4bd4f4fd56abc05110ap+8Q,
+ 0x2.37fe9ba6695821e9822d8c8af0a6p+8Q,
+ 0x3.3a2c667e37c942f182cd3223a936p+8Q,
+ 0x4.b1b500eb59f3f782c7ccec88754p+8Q,
+ 0x6.d3efd3b65b3d0d8488d30b79fa4cp+8Q,
+ 0x9.ee8224e65bed5ced8b75eaec609p+8Q,
+ 0xe.72416e510cca77d53fc615c1f3dp+8Q,
+ 0x1.4fb538b0a2dfe567a8904b7e0445p+12Q,
+ 0x1.e7f56a9266cf525a5b8cf4cb76cep+12Q,
+ 0x2.f0365c983f68c597ee49d099cce8p+12Q,
+ 0x4.53aa229e1b9f5b5e59625265951p+12Q,
+ /* Interval [-2.875, -2.75] (polynomial degree 24). */
+ -0x8.a41b1e4f36ff88dc820815607d68p-4Q,
+ 0xc.da87d3b69dc0f2f9c6f368b8ca1p-4Q,
+ 0x1.1474ad5c36158a7bea04fd2f98c6p+0Q,
+ 0x1.761ecb90c555df6555b7dba955b6p+0Q,
+ 0x1.d279bff9ae291caf6c4b4bcb3202p+0Q,
+ 0x2.4e5d00559a6e2b9b5d7fe1f6689cp+0Q,
+ 0x2.d57545a75cee8743ae2b17bc8d24p+0Q,
+ 0x3.8514eee3aac88b89bec2307021bap+0Q,
+ 0x4.5235e3b6e1891ffeb87fed9f8a24p+0Q,
+ 0x5.562acdb10eef3c9a773b3e27a864p+0Q,
+ 0x6.8ec8965c76efe03c26bff60b1194p+0Q,
+ 0x8.15251aca144877af32658399f9b8p+0Q,
+ 0x9.f08d56aba174d844138af782c0f8p+0Q,
+ 0xc.3dbbeda2679e8a1346ccc3f6da88p+0Q,
+ 0xf.0f5bfd5eacc26db308ffa0556fa8p+0Q,
+ 0x1.28a6ccd84476fbc713d6bab49ac9p+4Q,
+ 0x1.6d0a3ae2a3b1c8ff400641a3a21fp+4Q,
+ 0x1.c15701b28637f87acfb6a91d33b5p+4Q,
+ 0x2.28fbe0eccf472089b017651ca55ep+4Q,
+ 0x2.a8a453004f6e8ffaacd1603bc3dp+4Q,
+ 0x3.45ae4d9e1e7cd1a5dba0e4ec7f6cp+4Q,
+ 0x4.065fbfacb7fad3e473cb577a61e8p+4Q,
+ 0x4.f3d1473020927acac1944734a39p+4Q,
+ 0x6.54bb091245815a36fb74e314dd18p+4Q,
+ 0x7.d7f445129f7fb6c055e582d3f6ep+4Q,
+ /* Interval [-3, -2.875] (polynomial degree 23). */
+ -0xa.046d667e468f3e44dcae1afcc648p-4Q,
+ 0x9.70b88dcc006c214d8d996fdf5ccp-4Q,
+ 0xa.a8a39421c86d3ff24931a0929fp-4Q,
+ 0xd.2f4d1363f324da2b357c8b6ec94p-4Q,
+ 0xd.ca9aa1a3a5c00de11bf60499a97p-4Q,
+ 0xf.cf09c31eeb52a45dfa7ebe3778dp-4Q,
+ 0x1.04b133a39ed8a09691205660468bp+0Q,
+ 0x1.22b547a06edda944fcb12fd9b5ecp+0Q,
+ 0x1.2c57fce7db86a91df09602d344b3p+0Q,
+ 0x1.4aade4894708f84795212fe257eep+0Q,
+ 0x1.579c8b7b67ec4afed5b28c8bf787p+0Q,
+ 0x1.776820e7fc80ae5284239733078ap+0Q,
+ 0x1.883ab28c7301fde4ca6b8ec26ec8p+0Q,
+ 0x1.aa2ef6e1ae52eb42c9ee83b206e3p+0Q,
+ 0x1.bf4ad50f0a9a9311300cf0c51ee7p+0Q,
+ 0x1.e40206e0e96b1da463814dde0d09p+0Q,
+ 0x1.fdcbcffef3a21b29719c2bd9feb1p+0Q,
+ 0x2.25e2e8948939c4d42cf108fae4bep+0Q,
+ 0x2.44ce14d2b59c1c0e6bf2cfa81018p+0Q,
+ 0x2.70ee80bbd0387162be4861c43622p+0Q,
+ 0x2.954b64d2c2ebf3489b949c74476p+0Q,
+ 0x2.c616e133a811c1c9446105208656p+0Q,
+ 0x3.05a69dfe1a9ba1079f90fcf26bd4p+0Q,
+ 0x3.410d2ad16a0506de29736e6aafdap+0Q,
+ };
+
+static const size_t poly_deg[] =
+ {
+ 23,
+ 24,
+ 25,
+ 27,
+ 28,
+ 26,
+ 24,
+ 23,
+ };
+
+static const size_t poly_end[] =
+ {
+ 23,
+ 48,
+ 74,
+ 102,
+ 131,
+ 158,
+ 183,
+ 207,
+ };
+
+/* Compute sin (pi * X) for -0.25 <= X <= 0.5. */
+
+static __float128
+lg_sinpi (__float128 x)
+{
+ if (x <= 0.25Q)
+ return sinq (M_PIq * x);
+ else
+ return cosq (M_PIq * (0.5Q - x));
+}
+
+/* Compute cos (pi * X) for -0.25 <= X <= 0.5. */
+
+static __float128
+lg_cospi (__float128 x)
+{
+ if (x <= 0.25Q)
+ return cosq (M_PIq * x);
+ else
+ return sinq (M_PIq * (0.5Q - x));
+}
+
+/* Compute cot (pi * X) for -0.25 <= X <= 0.5. */
+
+static __float128
+lg_cotpi (__float128 x)
+{
+ return lg_cospi (x) / lg_sinpi (x);
+}
+
+/* Compute lgamma of a negative argument -50 < X < -2, setting
+ *SIGNGAMP accordingly. */
+
+__float128
+__quadmath_lgamma_negq (__float128 x, int *signgamp)
+{
+ /* Determine the half-integer region X lies in, handle exact
+ integers and determine the sign of the result. */
+ int i = floorq (-2 * x);
+ if ((i & 1) == 0 && i == -2 * x)
+ return 1.0Q / 0.0Q;
+ __float128 xn = ((i & 1) == 0 ? -i / 2 : (-i - 1) / 2);
+ i -= 4;
+ *signgamp = ((i & 2) == 0 ? -1 : 1);
+
+ SET_RESTORE_ROUNDF128 (FE_TONEAREST);
+
+ /* Expand around the zero X0 = X0_HI + X0_LO. */
+ __float128 x0_hi = lgamma_zeros[i][0], x0_lo = lgamma_zeros[i][1];
+ __float128 xdiff = x - x0_hi - x0_lo;
+
+ /* For arguments in the range -3 to -2, use polynomial
+ approximations to an adjusted version of the gamma function. */
+ if (i < 2)
+ {
+ int j = floorq (-8 * x) - 16;
+ __float128 xm = (-33 - 2 * j) * 0.0625Q;
+ __float128 x_adj = x - xm;
+ size_t deg = poly_deg[j];
+ size_t end = poly_end[j];
+ __float128 g = poly_coeff[end];
+ for (size_t j = 1; j <= deg; j++)
+ g = g * x_adj + poly_coeff[end - j];
+ return log1pq (g * xdiff / (x - xn));
+ }
+
+ /* The result we want is log (sinpi (X0) / sinpi (X))
+ + log (gamma (1 - X0) / gamma (1 - X)). */
+ __float128 x_idiff = fabsq (xn - x), x0_idiff = fabsq (xn - x0_hi - x0_lo);
+ __float128 log_sinpi_ratio;
+ if (x0_idiff < x_idiff * 0.5Q)
+ /* Use log not log1p to avoid inaccuracy from log1p of arguments
+ close to -1. */
+ log_sinpi_ratio = logq (lg_sinpi (x0_idiff)
+ / lg_sinpi (x_idiff));
+ else
+ {
+ /* Use log1p not log to avoid inaccuracy from log of arguments
+ close to 1. X0DIFF2 has positive sign if X0 is further from
+ XN than X is from XN, negative sign otherwise. */
+ __float128 x0diff2 = ((i & 1) == 0 ? xdiff : -xdiff) * 0.5Q;
+ __float128 sx0d2 = lg_sinpi (x0diff2);
+ __float128 cx0d2 = lg_cospi (x0diff2);
+ log_sinpi_ratio = log1pq (2 * sx0d2
+ * (-sx0d2 + cx0d2 * lg_cotpi (x_idiff)));
+ }
+
+ __float128 log_gamma_ratio;
+ __float128 y0 = 1 - x0_hi;
+ __float128 y0_eps = -x0_hi + (1 - y0) - x0_lo;
+ __float128 y = 1 - x;
+ __float128 y_eps = -x + (1 - y);
+ /* We now wish to compute LOG_GAMMA_RATIO
+ = log (gamma (Y0 + Y0_EPS) / gamma (Y + Y_EPS)). XDIFF
+ accurately approximates the difference Y0 + Y0_EPS - Y -
+ Y_EPS. Use Stirling's approximation. First, we may need to
+ adjust into the range where Stirling's approximation is
+ sufficiently accurate. */
+ __float128 log_gamma_adj = 0;
+ if (i < 20)
+ {
+ int n_up = (21 - i) / 2;
+ __float128 ny0, ny0_eps, ny, ny_eps;
+ ny0 = y0 + n_up;
+ ny0_eps = y0 - (ny0 - n_up) + y0_eps;
+ y0 = ny0;
+ y0_eps = ny0_eps;
+ ny = y + n_up;
+ ny_eps = y - (ny - n_up) + y_eps;
+ y = ny;
+ y_eps = ny_eps;
+ __float128 prodm1 = __quadmath_lgamma_productq (xdiff, y - n_up, y_eps, n_up);
+ log_gamma_adj = -log1pq (prodm1);
+ }
+ __float128 log_gamma_high
+ = (xdiff * log1pq ((y0 - e_hi - e_lo + y0_eps) / e_hi)
+ + (y - 0.5Q + y_eps) * log1pq (xdiff / y) + log_gamma_adj);
+ /* Compute the sum of (B_2k / 2k(2k-1))(Y0^-(2k-1) - Y^-(2k-1)). */
+ __float128 y0r = 1 / y0, yr = 1 / y;
+ __float128 y0r2 = y0r * y0r, yr2 = yr * yr;
+ __float128 rdiff = -xdiff / (y * y0);
+ __float128 bterm[NCOEFF];
+ __float128 dlast = rdiff, elast = rdiff * yr * (yr + y0r);
+ bterm[0] = dlast * lgamma_coeff[0];
+ for (size_t j = 1; j < NCOEFF; j++)
+ {
+ __float128 dnext = dlast * y0r2 + elast;
+ __float128 enext = elast * yr2;
+ bterm[j] = dnext * lgamma_coeff[j];
+ dlast = dnext;
+ elast = enext;
+ }
+ __float128 log_gamma_low = 0;
+ for (size_t j = 0; j < NCOEFF; j++)
+ log_gamma_low += bterm[NCOEFF - 1 - j];
+ log_gamma_ratio = log_gamma_high + log_gamma_low;
+
+ return log_sinpi_ratio + log_gamma_ratio;
+}
diff --git a/libquadmath/math/lgammaq_product.c b/libquadmath/math/lgammaq_product.c
new file mode 100644
index 00000000000..73091a8281e
--- /dev/null
+++ b/libquadmath/math/lgammaq_product.c
@@ -0,0 +1,50 @@
+/* Compute a product of 1 + (T/X), 1 + (T/(X+1)), ....
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "quadmath-imp.h"
+
+/* Compute the product of 1 + (T / (X + X_EPS)), 1 + (T / (X + X_EPS +
+ 1)), ..., 1 + (T / (X + X_EPS + N - 1)), minus 1. X is such that
+ all the values X + 1, ..., X + N - 1 are exactly representable, and
+ X_EPS / X is small enough that factors quadratic in it can be
+ neglected. */
+
+__float128
+__quadmath_lgamma_productq (__float128 t, __float128 x, __float128 x_eps, int n)
+{
+ __float128 ret = 0, ret_eps = 0;
+ for (int i = 0; i < n; i++)
+ {
+ __float128 xi = x + i;
+ __float128 quot = t / xi;
+ __float128 mhi, mlo;
+ mul_splitq (&mhi, &mlo, quot, xi);
+ __float128 quot_lo = (t - mhi - mlo) / xi - t * x_eps / (xi * xi);
+ /* We want (1 + RET + RET_EPS) * (1 + QUOT + QUOT_LO) - 1. */
+ __float128 rhi, rlo;
+ mul_splitq (&rhi, &rlo, ret, quot);
+ __float128 rpq = ret + quot;
+ __float128 rpq_eps = (ret - rpq) + quot;
+ __float128 nret = rpq + rhi;
+ __float128 nret_eps = (rpq - nret) + rhi;
+ ret_eps += (rpq_eps + nret_eps + rlo + ret_eps * quot
+ + quot_lo + quot_lo * (ret + ret_eps));
+ ret = nret;
+ }
+ return ret + ret_eps;
+}
diff --git a/libquadmath/math/llrintq.c b/libquadmath/math/llrintq.c
index a6a0ae64bd3..5cc0a4461c3 100644
--- a/libquadmath/math/llrintq.c
+++ b/libquadmath/math/llrintq.c
@@ -1,6 +1,6 @@
/* Round argument to nearest integral value according to current rounding
direction.
- Copyright (C) 1997-2017 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
Jakub Jelinek <jj@ultra.linux.cz>, 1999.
@@ -16,9 +16,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
@@ -53,9 +52,7 @@ llrintq (__float128 x)
/* In the event of overflow we must raise the "invalid"
exception, but not "inexact". */
t = nearbyintq (x);
-#ifdef USE_FENV_H
feraiseexcept (t == LLONG_MAX ? FE_INEXACT : FE_INVALID);
-#endif
}
else
#endif
@@ -82,21 +79,21 @@ llrintq (__float128 x)
unspecified. */
#if defined FE_INVALID || defined FE_INEXACT
if (x < (__float128) LLONG_MIN
- && x > (__float128) LLONG_MIN - 1.0Q)
+ && x > (__float128) LLONG_MIN - 1)
{
/* If truncation produces LLONG_MIN, the cast will not raise
the exception, but may raise "inexact". */
t = nearbyintq (x);
-#ifdef USE_FENV_H
feraiseexcept (t == LLONG_MIN ? FE_INEXACT : FE_INVALID);
-#endif
return LLONG_MIN;
}
+ else if (FIX_FLT128_LLONG_CONVERT_OVERFLOW && x != (__float128) LLONG_MIN)
+ {
+ feraiseexcept (FE_INVALID);
+ return sx == 0 ? LLONG_MAX : LLONG_MIN;
+ }
#endif
-
- /* The number is too large. It is left implementation defined
- what happens. */
return (long long int) x;
}
diff --git a/libquadmath/math/llroundq.c b/libquadmath/math/llroundq.c
index 098fb9ef72b..f22ad5a56c4 100644
--- a/libquadmath/math/llroundq.c
+++ b/libquadmath/math/llroundq.c
@@ -1,5 +1,5 @@
-/* Round __float128 value to long long int.
- Copyright (C) 1997-2017 Free Software Foundation, Inc.
+/* Round long double value to long long int.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
Jakub Jelinek <jj@ultra.linux.cz>, 1999.
@@ -15,13 +15,11 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
-
long long int
llroundq (__float128 x)
{
@@ -61,7 +59,7 @@ llroundq (__float128 x)
else
{
result = ((long long int) i0 << (j0 - 48)) | (j >> (112 - j0));
-#if defined FE_INVALID && defined USE_FENV_H
+#ifdef FE_INVALID
if (sign == 1 && result == LLONG_MIN)
/* Rounding brought the value out of range. */
feraiseexcept (FE_INVALID);
@@ -75,13 +73,18 @@ llroundq (__float128 x)
FE_INVALID must be raised and the return value is
unspecified. */
#ifdef FE_INVALID
- if (x <= (__float128) LLONG_MIN - 0.5Q)
+ if (FIX_FLT128_LLONG_CONVERT_OVERFLOW
+ && !(sign == -1 && x > (__float128) LLONG_MIN - 0.5Q))
+ {
+ feraiseexcept (FE_INVALID);
+ return sign == 1 ? LLONG_MAX : LLONG_MIN;
+ }
+ else if (!FIX_FLT128_LLONG_CONVERT_OVERFLOW
+ && x <= (__float128) LLONG_MIN - 0.5Q)
{
/* If truncation produces LLONG_MIN, the cast will not raise
the exception, but may raise "inexact". */
-#ifdef USE_FENV_H
feraiseexcept (FE_INVALID);
-#endif
return LLONG_MIN;
}
#endif
diff --git a/libquadmath/math/log10q.c b/libquadmath/math/log10q.c
index 3afb1121267..2c0c05440ba 100644
--- a/libquadmath/math/log10q.c
+++ b/libquadmath/math/log10q.c
@@ -1,14 +1,14 @@
-/* log10q.c
+/* log10l.c
*
- * Common logarithm, 128-bit __float128 precision
+ * Common logarithm, 128-bit long double precision
*
*
*
* SYNOPSIS:
*
- * __float128 x, y, log10l();
+ * long double x, y, log10l();
*
- * y = log10q( x );
+ * y = log10l( x );
*
*
*
@@ -57,9 +57,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
+ License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "quadmath-imp.h"
@@ -99,7 +97,7 @@ static const __float128 Q[12] =
9.147150349299596453976674231612674085381E3Q,
9.104928120962988414618126155557301584078E2Q,
4.839208193348159620282142911143429644326E1Q
-/* 1.000000000000000000000000000000000000000E0Q, */
+/* 1.000000000000000000000000000000000000000E0L, */
};
/* Coefficients for log(x) = z + z^3 P(z^2)/Q(z^2),
@@ -125,7 +123,7 @@ static const __float128 S[6] =
-5.748542087379434595104154610899551484314E4Q,
3.998526750980007367835804959888064681098E3Q,
-1.186359407982897997337150403816839480438E2Q
-/* 1.000000000000000000000000000000000000000E0Q, */
+/* 1.000000000000000000000000000000000000000E0L, */
};
static const __float128
@@ -188,14 +186,14 @@ log10q (__float128 x)
/* Test for domain */
GET_FLT128_WORDS64 (hx, lx, x);
if (((hx & 0x7fffffffffffffffLL) | lx) == 0)
- return (-1.0Q / fabsq (x)); /* log10l(+-0)=-inf */
+ return (-1 / fabsq (x)); /* log10l(+-0)=-inf */
if (hx < 0)
return (x - x) / (x - x);
if (hx >= 0x7fff000000000000LL)
return (x + x);
- if (x == 1.0Q)
- return 0.0Q;
+ if (x == 1)
+ return 0;
/* separate mantissa from exponent */
@@ -234,11 +232,11 @@ log10q (__float128 x)
if (x < SQRTH)
{
e -= 1;
- x = 2.0 * x - 1.0Q; /* 2x - 1 */
+ x = 2.0 * x - 1; /* 2x - 1 */
}
else
{
- x = x - 1.0Q;
+ x = x - 1;
}
z = x * x;
y = x * (z * neval (x, P, 12) / deval (x, Q, 11));
diff --git a/libquadmath/math/log1pq.c b/libquadmath/math/log1pq.c
index c59ceef5c9e..96e3d980b91 100644
--- a/libquadmath/math/log1pq.c
+++ b/libquadmath/math/log1pq.c
@@ -1,13 +1,13 @@
-/* log1pl.c
+/* log1pq.c
*
* Relative error logarithm
- * Natural logarithm of 1+x for __float128 precision
+ * Natural logarithm of 1+x, 128-bit long double precision
*
*
*
* SYNOPSIS:
*
- * __float128 x, y, log1pl();
+ * long double x, y, log1pq();
*
* y = log1pq( x );
*
@@ -49,9 +49,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
@@ -74,7 +73,7 @@ static const __float128
P2 = 2.014652742082537582487669938141683759923E5Q,
P1 = 7.771154681358524243729929227226708890930E4Q,
P0 = 1.313572404063446165910279910527789794488E4Q,
- /* Q12 = 1.000000000000000000000000000000000000000E0Q, */
+ /* Q12 = 1.000000000000000000000000000000000000000E0L, */
Q11 = 4.839208193348159620282142911143429644326E1Q,
Q10 = 9.104928120962988414618126155557301584078E2Q,
Q9 = 9.147150349299596453976674231612674085381E3Q,
@@ -101,7 +100,7 @@ static const __float128
R2 = 2.048819892795278657810231591630928516206E4Q,
R1 = -8.977257995689735303686582344659576526998E4Q,
R0 = 1.418134209872192732479751274970992665513E5Q,
- /* S6 = 1.000000000000000000000000000000000000000E0Q, */
+ /* S6 = 1.000000000000000000000000000000000000000E0L, */
S5 = -1.186359407982897997337150403816839480438E2Q,
S4 = 3.998526750980007367835804959888064681098E3Q,
S3 = -5.748542087379434595104154610899551484314E4Q,
@@ -114,8 +113,8 @@ static const __float128 C1 = 6.93145751953125E-1Q;
static const __float128 C2 = 1.428606820309417232121458176568075500134E-6Q;
static const __float128 sqrth = 0.7071067811865475244008443621048490392848Q;
-static const __float128 zero = 0.0Q;
-
+/* ln (2^16384 * (1 - 2^-113)) */
+static const __float128 zero = 0;
__float128
log1pq (__float128 xm1)
@@ -140,19 +139,19 @@ log1pq (__float128 xm1)
{
math_check_force_underflow (xm1);
if ((int) xm1 == 0)
- return xm1;
+ return xm1;
}
if (xm1 >= 0x1p113Q)
x = xm1;
else
- x = xm1 + 1.0Q;
+ x = xm1 + 1;
/* log1p(-1) = -inf */
- if (x <= 0.0Q)
+ if (x <= 0)
{
- if (x == 0.0Q)
- return (-1.0Q / zero); /* log1p(-1) = -inf */
+ if (x == 0)
+ return (-1 / zero); /* log1p(-1) = -inf */
else
return (zero / (x - x));
}
@@ -207,14 +206,14 @@ log1pq (__float128 xm1)
{
e -= 1;
if (e != 0)
- x = 2.0Q * x - 1.0Q; /* 2x - 1 */
+ x = 2 * x - 1; /* 2x - 1 */
else
x = xm1;
}
else
{
if (e != 0)
- x = x - 1.0Q;
+ x = x - 1;
else
x = xm1;
}
diff --git a/libquadmath/math/log2q.c b/libquadmath/math/log2q.c
index 865f341f03d..6dcc9cfdc68 100644
--- a/libquadmath/math/log2q.c
+++ b/libquadmath/math/log2q.c
@@ -1,13 +1,13 @@
-/* log2q.c
- * Base 2 logarithm for __float128 precision
+/* log2l.c
+ * Base 2 logarithm, 128-bit long double precision
*
*
*
* SYNOPSIS:
*
- * __float128 x, y, log2q();
+ * long double x, y, log2l();
*
- * y = log2q( x );
+ * y = log2l( x );
*
*
*
@@ -56,8 +56,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "quadmath-imp.h"
@@ -97,7 +96,7 @@ static const __float128 Q[12] =
9.147150349299596453976674231612674085381E3Q,
9.104928120962988414618126155557301584078E2Q,
4.839208193348159620282142911143429644326E1Q
-/* 1.000000000000000000000000000000000000000E0Q, */
+/* 1.000000000000000000000000000000000000000E0L, */
};
/* Coefficients for log(x) = z + z^3 P(z^2)/Q(z^2),
@@ -123,7 +122,7 @@ static const __float128 S[6] =
-5.748542087379434595104154610899551484314E4Q,
3.998526750980007367835804959888064681098E3Q,
-1.186359407982897997337150403816839480438E2Q
-/* 1.000000000000000000000000000000000000000E0Q, */
+/* 1.000000000000000000000000000000000000000E0L, */
};
static const __float128
@@ -181,14 +180,14 @@ log2q (__float128 x)
/* Test for domain */
GET_FLT128_WORDS64 (hx, lx, x);
if (((hx & 0x7fffffffffffffffLL) | lx) == 0)
- return (-1.0Q / fabsq (x)); /* log2l(+-0)=-inf */
+ return (-1 / fabsq (x)); /* log2l(+-0)=-inf */
if (hx < 0)
return (x - x) / (x - x);
if (hx >= 0x7fff000000000000LL)
return (x + x);
- if (x == 1.0Q)
- return 0.0Q;
+ if (x == 1)
+ return 0;
/* separate mantissa from exponent */
@@ -227,11 +226,11 @@ log2q (__float128 x)
if (x < SQRTH)
{
e -= 1;
- x = 2.0 * x - 1.0Q; /* 2x - 1 */
+ x = 2.0 * x - 1; /* 2x - 1 */
}
else
{
- x = x - 1.0Q;
+ x = x - 1;
}
z = x * x;
y = x * (z * neval (x, P, 12) / deval (x, Q, 11));
diff --git a/libquadmath/math/logbq.c b/libquadmath/math/logbq.c
index 2e47a4b434a..a1012add402 100644
--- a/libquadmath/math/logbq.c
+++ b/libquadmath/math/logbq.c
@@ -13,8 +13,12 @@
* ====================================================
*/
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
/*
- * long double logbl(x)
+ * long double logbq(x)
* IEEE 754 logb. Included to pass IEEE test suite. Not recommend.
* Use ilogb instead.
*/
diff --git a/libquadmath/math/logq.c b/libquadmath/math/logq.c
index 43249bb498a..6fdfc2d48e1 100644
--- a/libquadmath/math/logq.c
+++ b/libquadmath/math/logq.c
@@ -1,12 +1,12 @@
-/* logq.c
+/* logll.c
*
- * Natural logarithm for __float128 precision.
+ * Natural logarithm for 128-bit long double precision.
*
*
*
* SYNOPSIS:
*
- * __float128 x, y, logq();
+ * long double x, y, logq();
*
* y = logq( x );
*
@@ -42,7 +42,7 @@
*
*/
-/* Copyright 2001 by Stephen L. Moshier <moshier@na-net.ornl.gov>
+/* Copyright 2001 by Stephen L. Moshier <moshier@na-net.ornl.gov>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -55,8 +55,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
@@ -183,7 +183,7 @@ static const __float128
ln2b = 1.4286068203094172321214581765680755001344E-6Q;
__float128
-logq (__float128 x)
+logq(__float128 x)
{
__float128 z, y, w;
ieee854_float128 u, t;
@@ -240,11 +240,11 @@ logq (__float128 x)
/* On this interval the table is not used due to cancellation error. */
if ((x <= 1.0078125Q) && (x >= 0.9921875Q))
{
- if (x == 1.0Q)
- return 0.0Q;
- z = x - 1.0Q;
+ if (x == 1)
+ return 0;
+ z = x - 1;
k = 64;
- t.value = 1.0Q;
+ t.value = 1;
e = 0;
}
else
@@ -252,7 +252,7 @@ logq (__float128 x)
/* log(u) = log( t u/t ) = log(t) + log(u/t)
log(t) is tabulated in the lookup table.
Express log(u/t) = log(1+z), where z = u/t - 1 = (u-t)/t.
- cf. Cody & Waite. */
+ cf. Cody & Waite. */
z = (u.value - t.value) / t.value;
}
/* Series expansion of log(1+z). */
@@ -274,7 +274,7 @@ logq (__float128 x)
y += e * ln2b; /* Base 2 exponent offset times ln(2). */
y += z;
y += logtbl[k-26]; /* log(t) - (t-1) */
- y += (t.value - 1.0Q);
+ y += (t.value - 1);
y += e * ln2a;
return y;
}
diff --git a/libquadmath/math/lrintq.c b/libquadmath/math/lrintq.c
index 50a300554b9..e32b28c388c 100644
--- a/libquadmath/math/lrintq.c
+++ b/libquadmath/math/lrintq.c
@@ -1,6 +1,6 @@
/* Round argument to nearest integral value according to current rounding
direction.
- Copyright (C) 1997-2017 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
Jakub Jelinek <jj@ultra.linux.cz>, 1999.
@@ -16,9 +16,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
@@ -56,9 +55,7 @@ lrintq (__float128 x)
/* In the event of overflow we must raise the "invalid"
exception, but not "inexact". */
t = nearbyintq (x);
-#ifdef USE_FENV_H
feraiseexcept (t == LONG_MAX ? FE_INEXACT : FE_INVALID);
-#endif
}
else
#endif
@@ -85,9 +82,7 @@ lrintq (__float128 x)
/* In the event of overflow we must raise the "invalid"
exception, but not "inexact". */
t = nearbyintq (x);
-#ifdef USE_FENV_H
feraiseexcept (t == LONG_MAX ? FE_INEXACT : FE_INVALID);
-#endif
}
else
#endif
@@ -113,16 +108,20 @@ lrintq (__float128 x)
unspecified. */
#if defined FE_INVALID || defined FE_INEXACT
if (x < (__float128) LONG_MIN
- && x > (__float128) LONG_MIN - 1.0Q)
+ && x > (__float128) LONG_MIN - 1)
{
/* If truncation produces LONG_MIN, the cast will not raise
the exception, but may raise "inexact". */
t = nearbyintq (x);
-#ifdef USE_FENV_H
feraiseexcept (t == LONG_MIN ? FE_INEXACT : FE_INVALID);
-#endif
return LONG_MIN;
}
+ else if (FIX_FLT128_LONG_CONVERT_OVERFLOW && x != (__float128) LONG_MIN)
+ {
+ feraiseexcept (FE_INVALID);
+ return sx == 0 ? LONG_MAX : LONG_MIN;
+ }
+
#endif
return (long int) x;
}
diff --git a/libquadmath/math/lroundq.c b/libquadmath/math/lroundq.c
index 55285034cec..0ce4ce0c1bc 100644
--- a/libquadmath/math/lroundq.c
+++ b/libquadmath/math/lroundq.c
@@ -1,5 +1,5 @@
-/* Round __float128 value to long int.
- Copyright (C) 1997-2017 Free Software Foundation, Inc.
+/* Round long double value to long int.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
Jakub Jelinek <jj@ultra.linux.cz>, 1999.
@@ -15,13 +15,11 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
-
long int
lroundq (__float128 x)
{
@@ -46,7 +44,7 @@ lroundq (__float128 x)
{
i0 += 0x0000800000000000LL >> j0;
result = i0 >> (48 - j0);
-#if defined FE_INVALID && defined USE_FENV_H
+#ifdef FE_INVALID
if (sizeof (long int) == 4
&& sign == 1
&& result == LONG_MIN)
@@ -68,7 +66,7 @@ lroundq (__float128 x)
else
{
result = ((long int) i0 << (j0 - 48)) | (j >> (112 - j0));
-#if defined FE_INVALID && defined USE_FENV_H
+#ifdef FE_INVALID
if (sizeof (long int) == 8
&& sign == 1
&& result == LONG_MIN)
@@ -84,16 +82,23 @@ lroundq (__float128 x)
FE_INVALID must be raised and the return value is
unspecified. */
#ifdef FE_INVALID
- if (x <= (__float128) LONG_MIN - 0.5Q)
+ if (FIX_FLT128_LONG_CONVERT_OVERFLOW
+ && !(sign == -1 && x > (__float128) LONG_MIN - 0.5Q))
+ {
+ feraiseexcept (FE_INVALID);
+ return sign == 1 ? LONG_MAX : LONG_MIN;
+ }
+ else if (!FIX_FLT128_LONG_CONVERT_OVERFLOW
+ && x <= (__float128) LONG_MIN - 0.5Q)
{
/* If truncation produces LONG_MIN, the cast will not raise
the exception, but may raise "inexact". */
-#ifdef USE_FENV_H
feraiseexcept (FE_INVALID);
-#endif
return LONG_MIN;
}
#endif
+ /* The number is too large. It is left implementation defined
+ what happens. */
return (long int) x;
}
diff --git a/libquadmath/math/modfq.c b/libquadmath/math/modfq.c
index 8c5db54bb76..12a87e75ee1 100644
--- a/libquadmath/math/modfq.c
+++ b/libquadmath/math/modfq.c
@@ -1,4 +1,4 @@
-/* modfq.c -- __float128 version of s_modf.c.
+/* s_modfl.c -- long double version of s_modf.c.
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -13,12 +13,25 @@
* ====================================================
*/
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * modfq(long double x, long double *iptr)
+ * return fraction part of x, and return x's integral part in *iptr.
+ * Method:
+ * Bit twiddling.
+ *
+ * Exception:
+ * No exception.
+ */
+
#include "quadmath-imp.h"
static const __float128 one = 1.0;
-__float128
-modfq (__float128 x, __float128 *iptr)
+__float128 modfq(__float128 x, __float128 *iptr)
{
int64_t i0,i1,j0;
uint64_t i;
diff --git a/libquadmath/math/nearbyintq.c b/libquadmath/math/nearbyintq.c
index b250927ea2a..1e24c46da8b 100644
--- a/libquadmath/math/nearbyintq.c
+++ b/libquadmath/math/nearbyintq.c
@@ -1,4 +1,4 @@
-/* nearbyintq.c -- __float128 version of s_nearbyint.c.
+/* s_nearbyintl.c -- long double version of s_nearbyint.c.
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -24,12 +24,6 @@
*/
#include "quadmath-imp.h"
-#ifdef HAVE_FENV_H
-# include <fenv.h>
-# if defined HAVE_FEHOLDEXCEPT && defined HAVE_FESETENV
-# define USE_FENV_H
-# endif
-#endif
static const __float128
TWO112[2]={
@@ -37,12 +31,9 @@ TWO112[2]={
-5.19229685853482762853049632922009600E+33Q /* 0xC06F000000000000, 0 */
};
-__float128
-nearbyintq(__float128 x)
+__float128 nearbyintq(__float128 x)
{
-#ifdef USE_FENV_H
fenv_t env;
-#endif
int64_t i0,j0,sx;
uint64_t i1 __attribute__ ((unused));
__float128 w,t;
@@ -51,15 +42,11 @@ nearbyintq(__float128 x)
j0 = ((i0>>48)&0x7fff)-0x3fff;
if(j0<112) {
if(j0<0) {
-#ifdef USE_FENV_H
feholdexcept (&env);
-#endif
- w = TWO112[sx]+x;
+ w = TWO112[sx] + math_opt_barrier (x);
t = w-TWO112[sx];
math_force_eval (t);
-#ifdef USE_FENV_H
fesetenv (&env);
-#endif
GET_FLT128_MSW64(i0,t);
SET_FLT128_MSW64(t,(i0&0x7fffffffffffffffLL)|(sx<<63));
return t;
@@ -68,14 +55,10 @@ nearbyintq(__float128 x)
if(j0==0x4000) return x+x; /* inf or NaN */
else return x; /* x is integral */
}
-#ifdef USE_FENV_H
feholdexcept (&env);
-#endif
- w = TWO112[sx]+x;
+ w = TWO112[sx] + math_opt_barrier (x);
t = w-TWO112[sx];
math_force_eval (t);
-#ifdef USE_FENV_H
fesetenv (&env);
-#endif
return t;
}
diff --git a/libquadmath/math/nextafterq.c b/libquadmath/math/nextafterq.c
index a030e9c6444..5f1fae92e5b 100644
--- a/libquadmath/math/nextafterq.c
+++ b/libquadmath/math/nextafterq.c
@@ -1,4 +1,4 @@
-/* nextafterq.c -- __float128 version of s_nextafter.c.
+/* s_nextafterl.c -- long double version of s_nextafter.c.
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -13,11 +13,20 @@
* ====================================================
*/
-#include <errno.h>
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/* IEEE functions
+ * nextafterq(x,y)
+ * return the next machine floating-point number of x in the
+ * direction toward y.
+ * Special cases:
+ */
+
#include "quadmath-imp.h"
-__float128
-nextafterq (__float128 x, __float128 y)
+__float128 nextafterq(__float128 x, __float128 y)
{
int64_t hx,hy,ix,iy;
uint64_t lx,ly;
@@ -32,9 +41,11 @@ nextafterq (__float128 x, __float128 y)
return x+y;
if(x==y) return y; /* x=y, return y */
if((ix|lx)==0) { /* x == 0 */
+ __float128 u;
SET_FLT128_WORDS64(x,hy&0x8000000000000000ULL,1);/* return +-minsubnormal */
-
- /* here we should raise an underflow flag */
+ u = math_opt_barrier (x);
+ u = u * u;
+ math_force_eval (u); /* raise underflow flag */
return x;
}
if(hx>=0) { /* x > 0 */
@@ -61,7 +72,7 @@ nextafterq (__float128 x, __float128 y)
errno = ERANGE;
}
if(hy==0) {
- __float128 u = x*x; /* underflow */
+ __float128 u = x*x; /* underflow */
math_force_eval (u); /* raise underflow flag */
errno = ERANGE;
}
diff --git a/libquadmath/math/powq.c b/libquadmath/math/powq.c
index 4d586d6534a..b8250207431 100644
--- a/libquadmath/math/powq.c
+++ b/libquadmath/math/powq.c
@@ -11,9 +11,9 @@
/* Expansions and modifications for 128-bit long double are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
+ and are incorporated herein by permission of the author. The author
reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under
+ copying permissions. These modifications are distributed here under
the following terms:
This library is free software; you can redistribute it and/or
@@ -27,8 +27,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
/* powq(x,y) return x**y
*
@@ -67,7 +67,7 @@
#include "quadmath-imp.h"
static const __float128 bp[] = {
- 1.0Q,
+ 1,
1.5Q,
};
@@ -83,9 +83,9 @@ static const __float128 dp_l[] = {
1.0579781240112554492329533686862998106046E-16Q
};
-static const __float128 zero = 0.0Q,
- one = 1.0Q,
- two = 2.0Q,
+static const __float128 zero = 0,
+ one = 1,
+ two = 2,
two113 = 1.0384593717069655257060992658440192E34Q,
huge = 1.0e3000Q,
tiny = 1.0e-3000Q;
@@ -164,13 +164,14 @@ powq (__float128 x, __float128 y)
/* y==zero: x**0 = 1 */
- if ((iy | q.words32.w1 | q.words32.w2 | q.words32.w3) == 0)
+ if ((iy | q.words32.w1 | q.words32.w2 | q.words32.w3) == 0
+ && !issignalingq (x))
return one;
/* 1.0**y = 1; -1.0**+-Inf = 1 */
- if (x == one)
+ if (x == one && !issignalingq (y))
return one;
- if (x == -1.0Q && iy == 0x7fff0000
+ if (x == -1 && iy == 0x7fff0000
&& (q.words32.w1 | q.words32.w2 | q.words32.w3) == 0)
return one;
@@ -264,7 +265,7 @@ powq (__float128 x, __float128 y)
/* sgn (sign of result -ve**odd) = -1 else = 1 */
sgn = one;
if (((((uint32_t) hx >> 31) - 1) | (yisint - 1)) == 0)
- sgn = -one; /* (-ve)**(odd int) */
+ sgn = -one; /* (-ve)**(odd int) */
/* |y| is huge.
2^-16495 = 1/2 of smallest representable value.
diff --git a/libquadmath/math/remainderq.c b/libquadmath/math/remainderq.c
index c3f5641293f..5aa1f1a4caa 100644
--- a/libquadmath/math/remainderq.c
+++ b/libquadmath/math/remainderq.c
@@ -1,4 +1,4 @@
-/* fmodq.c -- __float128 version of e_fmod.c.
+/* e_fmodl.c -- long double version of e_fmod.c.
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
/*
@@ -7,61 +7,63 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
/* remainderq(x,p)
- * Return :
- * returns x REM p = x - [x/p]*p as if in infinite
- * precise arithmetic, where [x/p] is the (infinite bit)
+ * Return :
+ * returns x REM p = x - [x/p]*p as if in infinite
+ * precise arithmetic, where [x/p] is the (infinite bit)
* integer nearest x/p (in half way case choose the even one).
- * Method :
- * Based on fmodq() return x-[x/p]chopped*p exactlp.
+ * Method :
+ * Based on fmodl() return x-[x/p]chopped*p exactlp.
*/
#include "quadmath-imp.h"
-static const __float128 zero = 0.0Q;
+static const __float128 zero = 0;
+
__float128
-remainderq (__float128 x, __float128 p)
+remainderq(__float128 x, __float128 p)
{
- int64_t hx,hp;
- uint64_t sx,lx,lp;
- __float128 p_half;
+ int64_t hx,hp;
+ uint64_t sx,lx,lp;
+ __float128 p_half;
+
+ GET_FLT128_WORDS64(hx,lx,x);
+ GET_FLT128_WORDS64(hp,lp,p);
+ sx = hx&0x8000000000000000ULL;
+ hp &= 0x7fffffffffffffffLL;
+ hx &= 0x7fffffffffffffffLL;
- GET_FLT128_WORDS64(hx,lx,x);
- GET_FLT128_WORDS64(hp,lp,p);
- sx = hx&0x8000000000000000ULL;
- hp &= 0x7fffffffffffffffLL;
- hx &= 0x7fffffffffffffffLL;
+ /* purge off exception values */
+ if((hp|lp)==0) return (x*p)/(x*p); /* p = 0 */
+ if((hx>=0x7fff000000000000LL)|| /* x not finite */
+ ((hp>=0x7fff000000000000LL)&& /* p is NaN */
+ (((hp-0x7fff000000000000LL)|lp)!=0)))
+ return (x*p)/(x*p);
- /* purge off exception values */
- if((hp|lp)==0) return (x*p)/(x*p); /* p = 0 */
- if((hx>=0x7fff000000000000LL)|| /* x not finite */
- ((hp>=0x7fff000000000000LL)&& /* p is NaN */
- (((hp-0x7fff000000000000LL)|lp)!=0)))
- return (x*p)/(x*p);
- if (hp<=0x7ffdffffffffffffLL) x = fmodq (x,p+p); /* now x < 2p */
- if (((hx-hp)|(lx-lp))==0) return zero*x;
- x = fabsq(x);
- p = fabsq(p);
- if (hp<0x0002000000000000LL) {
- if(x+x>p) {
- x-=p;
- if(x+x>=p) x -= p;
- }
- } else {
- p_half = 0.5Q*p;
- if(x>p_half) {
- x-=p;
- if(x>=p_half) x -= p;
- }
- }
- GET_FLT128_MSW64(hx,x);
- SET_FLT128_MSW64(x,hx^sx);
- return x;
+ if (hp<=0x7ffdffffffffffffLL) x = fmodq(x,p+p); /* now x < 2p */
+ if (((hx-hp)|(lx-lp))==0) return zero*x;
+ x = fabsq(x);
+ p = fabsq(p);
+ if (hp<0x0002000000000000LL) {
+ if(x+x>p) {
+ x-=p;
+ if(x+x>=p) x -= p;
+ }
+ } else {
+ p_half = 0.5Q*p;
+ if(x>p_half) {
+ x-=p;
+ if(x>=p_half) x -= p;
+ }
+ }
+ GET_FLT128_MSW64(hx,x);
+ SET_FLT128_MSW64(x,hx^sx);
+ return x;
}
diff --git a/libquadmath/math/remquoq.c b/libquadmath/math/remquoq.c
index fa85c5b2d50..36a5eedf774 100644
--- a/libquadmath/math/remquoq.c
+++ b/libquadmath/math/remquoq.c
@@ -1,5 +1,5 @@
/* Compute remainder and a congruent to the quotient.
- Copyright (C) 1997-2017 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
Jakub Jelinek <jj@ultra.linux.cz>, 1999.
@@ -15,13 +15,11 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
-
static const __float128 zero = 0.0;
@@ -102,8 +100,8 @@ remquoq (__float128 x, __float128 y, int *quo)
*quo = qs ? -cquo : cquo;
/* Ensure correct sign of zero result in round-downward mode. */
- if (x == 0.0Q)
- x = 0.0Q;
+ if (x == 0)
+ x = 0;
if (sx)
x = -x;
return x;
diff --git a/libquadmath/math/rintq.c b/libquadmath/math/rintq.c
index 7bc9684e5ea..a11d8f1ed1d 100644
--- a/libquadmath/math/rintq.c
+++ b/libquadmath/math/rintq.c
@@ -1,4 +1,4 @@
-/* rintq.c -- __float128 version of s_rint.c.
+/* s_rintl.c -- long double version of s_rint.c.
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -13,6 +13,10 @@
* ====================================================
*/
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
/*
* rintq(x)
* Return x rounded to integral value according to the prevailing
@@ -23,16 +27,17 @@
* Inexact flag raised if x not equal to rintq(x).
*/
+#define NO_MATH_REDIRECT
+
#include "quadmath-imp.h"
static const __float128
TWO112[2]={
- 5.19229685853482762853049632922009600E+33Q, /* 0x406F000000000000, 0 */
- -5.19229685853482762853049632922009600E+33Q /* 0xC06F000000000000, 0 */
+ 5.19229685853482762853049632922009600E+33L, /* 0x406F000000000000, 0 */
+ -5.19229685853482762853049632922009600E+33L /* 0xC06F000000000000, 0 */
};
-__float128
-rintq (__float128 x)
+__float128 rintq(__float128 x)
{
int64_t i0,j0,sx;
uint64_t i1 __attribute__ ((unused));
diff --git a/libquadmath/math/roundq.c b/libquadmath/math/roundq.c
index b48366315f4..5d6d28b3771 100644
--- a/libquadmath/math/roundq.c
+++ b/libquadmath/math/roundq.c
@@ -1,5 +1,5 @@
-/* Round __float128 to integer away from zero.
- Copyright (C) 1997-2017 Free Software Foundation, Inc.
+/* Round long double to integer away from zero.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
Jakub Jelinek <jj@ultra.linux.cz>, 1999.
@@ -15,9 +15,10 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define NO_MATH_REDIRECT
#include "quadmath-imp.h"
@@ -44,6 +45,7 @@ roundq (__float128 x)
if (((i0 & i) | i1) == 0)
/* X is integral. */
return x;
+
i0 += 0x0000800000000000LL >> j0;
i0 &= ~i;
i1 = 0;
diff --git a/libquadmath/math/scalblnq.c b/libquadmath/math/scalblnq.c
index 6aac21125f8..a7a355ea70d 100644
--- a/libquadmath/math/scalblnq.c
+++ b/libquadmath/math/scalblnq.c
@@ -1,7 +1,8 @@
-/* scalblnq.c -- __float128 version of s_scalbn.c.
+/* s_scalblnl.c -- long double version of s_scalbn.c.
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
+/* @(#)s_scalbn.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -13,9 +14,13 @@
* ====================================================
*/
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
/*
- * scalblnq (_float128 x, long int n)
- * scalblnq(x,n) returns x* 2**n computed by exponent
+ * scalblnl (long double x, long int n)
+ * scalblnl(x,n) returns x* 2**n computed by exponent
* manipulation rather than by actually performing an
* exponentiation or a multiplication.
*/
@@ -28,8 +33,7 @@ twom114 = 4.8148248609680896326399448564623183E-35Q, /* 0x3F8D000000000000, 0 */
huge = 1.0E+4900Q,
tiny = 1.0E-4900Q;
-__float128
-scalblnq (__float128 x, long int n)
+__float128 scalblnq (__float128 x, long int n)
{
int64_t k,hx,lx;
GET_FLT128_WORDS64(hx,lx,x);
diff --git a/libquadmath/math/scalbnq.c b/libquadmath/math/scalbnq.c
index 9ed5fe61799..4167a4b2193 100644
--- a/libquadmath/math/scalbnq.c
+++ b/libquadmath/math/scalbnq.c
@@ -1,7 +1,8 @@
-/* scalbnq.c -- __float128 version of s_scalbn.c.
+/* s_scalbnl.c -- long double version of s_scalbn.c.
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
+/* @(#)s_scalbn.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -13,9 +14,12 @@
* ====================================================
*/
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
/*
- * scalbnq (__float128 x, int n)
+ * scalbnq (long double x, int n)
* scalbnq(x,n) returns x* 2**n computed by exponent
* manipulation rather than by actually performing an
* exponentiation or a multiplication.
@@ -29,8 +33,7 @@ twom114 = 4.8148248609680896326399448564623183E-35Q, /* 0x3F8D000000000000, 0 */
huge = 1.0E+4900Q,
tiny = 1.0E-4900Q;
-__float128
-scalbnq (__float128 x, int n)
+__float128 scalbnq (__float128 x, int n)
{
int64_t k,hx,lx;
GET_FLT128_WORDS64(hx,lx,x);
diff --git a/libquadmath/math/signbitq.c b/libquadmath/math/signbitq.c
index 2ddab8667a2..8f7020e349e 100644
--- a/libquadmath/math/signbitq.c
+++ b/libquadmath/math/signbitq.c
@@ -1,10 +1,26 @@
-#include "quadmath-imp.h"
+/* Return nonzero value if number is negative.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "quadmath-imp.h"
int
-signbitq (const __float128 x)
+signbitq (__float128 x)
{
- ieee854_float128 f;
- f.value = x;
- return f.ieee.negative;
+ return __builtin_signbit (x);
}
diff --git a/libquadmath/math/sincos_table.c b/libquadmath/math/sincos_table.c
index 362f517a6ef..7f50b8c1704 100644
--- a/libquadmath/math/sincos_table.c
+++ b/libquadmath/math/sincos_table.c
@@ -1,5 +1,5 @@
/* Quad-precision floating point sine and cosine tables.
- Copyright (C) 1999-2017 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
/* For 0.1484375 + n/128.0, n=0..82 this table contains
first 113 bits of cosine, then at least 113 additional
@@ -26,11 +25,13 @@
Computed using gmp.
*/
+/* Include to grab typedefs and wrappers for __float128 and such. */
+
#include "quadmath-imp.h"
const __float128 __sincosq_table[] = {
-/* x = 1.48437500000000000000000000000000000e-01Q 3ffc3000000000000000000000000000 */
+/* x = 1.48437500000000000000000000000000000e-01L 3ffc3000000000000000000000000000 */
/* cos(x) = 0.fd2f5320e1b790209b4dda2f98f79caaa7b873aff1014b0fbc5243766d03cb006bc837c4358 */
9.89003367927322909016887196069562069e-01Q, /* 3ffefa5ea641c36f2041369bb45f31ef */
2.15663692029265697782289400027743703e-35Q, /* 3f8bcaaa7b873aff1014b0fbc5243767 */
diff --git a/libquadmath/math/sincosq.c b/libquadmath/math/sincosq.c
index d83b1a6b757..83bc328ac2d 100644
--- a/libquadmath/math/sincosq.c
+++ b/libquadmath/math/sincosq.c
@@ -1,5 +1,5 @@
/* Compute sine and cosine of argument.
- Copyright (C) 1997-2017 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
Jakub Jelinek <jj@ultra.linux.cz>.
@@ -15,11 +15,9 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
-#include <errno.h>
#include "quadmath-imp.h"
void
@@ -33,7 +31,7 @@ sincosq (__float128 x, __float128 *sinx, __float128 *cosx)
/* |x| ~< pi/4 */
ix &= 0x7fffffffffffffffLL;
if (ix <= 0x3ffe921fb54442d1LL)
- __quadmath_kernel_sincosq (x, 0.0Q, sinx, cosx, 0);
+ __quadmath_kernel_sincosq (x, 0, sinx, cosx, 0);
else if (ix >= 0x7fff000000000000LL)
{
/* sin(Inf or NaN) is NaN */
diff --git a/libquadmath/math/sincosq_kernel.c b/libquadmath/math/sincosq_kernel.c
index 171ed6fc117..9f0671bf1d0 100644
--- a/libquadmath/math/sincosq_kernel.c
+++ b/libquadmath/math/sincosq_kernel.c
@@ -1,5 +1,5 @@
/* Quad-precision floating point sine and cosine on <-pi/4,pi/4>.
- Copyright (C) 1999-2017 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
@@ -89,15 +88,14 @@ static const __float128 c[] = {
2.81068754939739570236322404393398135e-15Q, /* 3fce9510115aabf87aceb2022a9a9180 */
};
-#define SINCOSQ_COS_HI 0
-#define SINCOSQ_COS_LO 1
-#define SINCOSQ_SIN_HI 2
-#define SINCOSQ_SIN_LO 3
+#define SINCOSL_COS_HI 0
+#define SINCOSL_COS_LO 1
+#define SINCOSL_SIN_HI 2
+#define SINCOSL_SIN_LO 3
extern const __float128 __sincosq_table[];
void
-__quadmath_kernel_sincosq(__float128 x, __float128 y, __float128 *sinx,
- __float128 *cosx, int iy)
+__quadmath_kernel_sincosq(__float128 x, __float128 y, __float128 *sinx, __float128 *cosx, int iy)
{
__float128 h, l, z, sin_l, cos_l_m1;
int64_t ix;
@@ -128,7 +126,7 @@ __quadmath_kernel_sincosq(__float128 x, __float128 y, __float128 *sinx,
else
{
/* So that we don't have to use too large polynomial, we find
- l and h such that x = l + h, where fabsl(l) <= 1.0/256 with 83
+ l and h such that x = l + h, where fabsq(l) <= 1.0/256 with 83
possible values for h. We look up cosq(h) and sinq(h) in
pre-computed tables, compute cosq(l) and sinq(l) using a
Chebyshev polynomial of degree 10(11) and compute
@@ -137,10 +135,10 @@ __quadmath_kernel_sincosq(__float128 x, __float128 y, __float128 *sinx,
index = 0x3ffe - (tix >> 16);
hix = (tix + (0x200 << index)) & (0xfffffc00 << index);
if (signbitq (x))
- {
- x = -x;
- y = -y;
- }
+ {
+ x = -x;
+ y = -y;
+ }
switch (index)
{
case 0: index = ((45 << 10) + hix - 0x3ffe0000) >> 8; break;
@@ -157,14 +155,14 @@ __quadmath_kernel_sincosq(__float128 x, __float128 y, __float128 *sinx,
z = l * l;
sin_l = l*(ONE+z*(SSIN1+z*(SSIN2+z*(SSIN3+z*(SSIN4+z*SSIN5)))));
cos_l_m1 = z*(SCOS1+z*(SCOS2+z*(SCOS3+z*(SCOS4+z*SCOS5))));
- z = __sincosq_table [index + SINCOSQ_SIN_HI]
- + (__sincosq_table [index + SINCOSQ_SIN_LO]
- + (__sincosq_table [index + SINCOSQ_SIN_HI] * cos_l_m1)
- + (__sincosq_table [index + SINCOSQ_COS_HI] * sin_l));
+ z = __sincosq_table [index + SINCOSL_SIN_HI]
+ + (__sincosq_table [index + SINCOSL_SIN_LO]
+ + (__sincosq_table [index + SINCOSL_SIN_HI] * cos_l_m1)
+ + (__sincosq_table [index + SINCOSL_COS_HI] * sin_l));
*sinx = (ix < 0) ? -z : z;
- *cosx = __sincosq_table [index + SINCOSQ_COS_HI]
- + (__sincosq_table [index + SINCOSQ_COS_LO]
- - (__sincosq_table [index + SINCOSQ_SIN_HI] * sin_l
- - __sincosq_table [index + SINCOSQ_COS_HI] * cos_l_m1));
+ *cosx = __sincosq_table [index + SINCOSL_COS_HI]
+ + (__sincosq_table [index + SINCOSL_COS_LO]
+ - (__sincosq_table [index + SINCOSL_SIN_HI] * sin_l
+ - __sincosq_table [index + SINCOSL_COS_HI] * cos_l_m1));
}
}
diff --git a/libquadmath/math/sinhq.c b/libquadmath/math/sinhq.c
index a4191c0fd3d..9e59460de9c 100644
--- a/libquadmath/math/sinhq.c
+++ b/libquadmath/math/sinhq.c
@@ -1,5 +1,5 @@
-/* sinhq.c -- __float128 version of e_sinh.c.
- * Conversion to __float128 by Ulrich Drepper,
+/* e_sinhl.c -- long double version of e_sinh.c.
+ * Conversion to long double by Ulrich Drepper,
* Cygnus Support, drepper@cygnus.com.
*/
@@ -14,11 +14,11 @@
* ====================================================
*/
-/* Changes for 128-bit __float128 are
+/* Changes for 128-bit long double are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
+ and are incorporated herein by permission of the author. The author
reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under
+ copying permissions. These modifications are distributed here under
the following terms:
This library is free software; you can redistribute it and/or
@@ -32,31 +32,31 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
/* sinhq(x)
* Method :
* mathematically sinh(x) if defined to be (exp(x)-exp(-x))/2
- * 1. Replace x by |x| (sinhq(-x) = -sinhq(x)).
+ * 1. Replace x by |x| (sinhl(-x) = -sinhl(x)).
* 2.
* E + E/(E+1)
- * 0 <= x <= 25 : sinhq(x) := --------------, E=expm1q(x)
+ * 0 <= x <= 25 : sinhl(x) := --------------, E=expm1q(x)
* 2
*
- * 25 <= x <= lnovft : sinhq(x) := expq(x)/2
- * lnovft <= x <= ln2ovft: sinhq(x) := expq(x/2)/2 * expq(x/2)
- * ln2ovft < x : sinhq(x) := x*shuge (overflow)
+ * 25 <= x <= lnovft : sinhl(x) := expq(x)/2
+ * lnovft <= x <= ln2ovft: sinhl(x) := expq(x/2)/2 * expq(x/2)
+ * ln2ovft < x : sinhl(x) := x*shuge (overflow)
*
* Special cases:
- * sinhq(x) is |x| if x is +INF, -INF, or NaN.
- * only sinhq(0)=0 is exact for finite x.
+ * sinhl(x) is |x| if x is +INF, -INF, or NaN.
+ * only sinhl(0)=0 is exact for finite x.
*/
#include "quadmath-imp.h"
static const __float128 one = 1.0, shuge = 1.0e4931Q,
- ovf_thresh = 1.1357216553474703894801348310092223067821E4Q;
+ovf_thresh = 1.1357216553474703894801348310092223067821E4Q;
__float128
sinhq (__float128 x)
@@ -74,7 +74,7 @@ sinhq (__float128 x)
if (ix >= 0x7fff0000)
return x + x;
- h = 0.5Q;
+ h = 0.5;
if (jx & 0x80000000)
h = -h;
@@ -92,7 +92,7 @@ sinhq (__float128 x)
}
t = expm1q (u.value);
if (ix < 0x3fff0000)
- return h * (2.0Q * t - t * t / (t + one));
+ return h * (2.0 * t - t * t / (t + one));
return h * (t + t / (t + one));
}
@@ -104,11 +104,11 @@ sinhq (__float128 x)
Overflow threshold is log(2 * maxdouble). */
if (u.value <= ovf_thresh)
{
- w = expq (0.5Q * u.value);
+ w = expq (0.5 * u.value);
t = h * w;
return t * w;
}
- /* |x| > overflowthreshold, sinhq(x) overflow */
+ /* |x| > overflowthreshold, sinhl(x) overflow */
return x * shuge;
}
diff --git a/libquadmath/math/sinq.c b/libquadmath/math/sinq.c
index 989f679d6d6..d381f3ac40a 100644
--- a/libquadmath/math/sinq.c
+++ b/libquadmath/math/sinq.c
@@ -1,4 +1,4 @@
-/* sinq.c -- __float128 version of s_sin.c.
+/* s_sinl.c -- long double version of s_sin.c.
* Conversion to long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -17,8 +17,8 @@
* Return sine function of x.
*
* kernel function:
- * __quadmath_kernel_sinq ... sine function on [-pi/4,pi/4]
- * __quadmath_kernel_cosq ... cose function on [-pi/4,pi/4]
+ * __quadmath_kernel_sinq ... sine function on [-pi/4,pi/4]
+ * __quadmath_kernel_cosq ... cose function on [-pi/4,pi/4]
* __quadmath_rem_pio2q ... argument reduction routine
*
* Method.
@@ -46,10 +46,9 @@
#include "quadmath-imp.h"
-__float128
-sinq (__float128 x)
+__float128 sinq(__float128 x)
{
- __float128 y[2],z=0.0Q;
+ __float128 y[2],z=0;
int64_t n, ix;
/* High word of x. */
@@ -64,6 +63,8 @@ sinq (__float128 x)
else if (ix>=0x7fff000000000000LL) {
if (ix == 0x7fff000000000000LL) {
GET_FLT128_LSW64(n,x);
+ if (n == 0)
+ errno = EDOM;
}
return x-x;
}
diff --git a/libquadmath/math/sinq_kernel.c b/libquadmath/math/sinq_kernel.c
index 873341a7617..9425d249451 100644
--- a/libquadmath/math/sinq_kernel.c
+++ b/libquadmath/math/sinq_kernel.c
@@ -1,5 +1,5 @@
/* Quad-precision floating point sine on <-pi/4,pi/4>.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
@@ -70,14 +69,14 @@ static const __float128 c[] = {
-2.50521016467996193495359189395805639E-08Q, /* bfe5ae644ee90c47dc71839de75b2787 */
};
-#define SINCOSQ_COS_HI 0
-#define SINCOSQ_COS_LO 1
-#define SINCOSQ_SIN_HI 2
-#define SINCOSQ_SIN_LO 3
+#define SINCOSL_COS_HI 0
+#define SINCOSL_COS_LO 1
+#define SINCOSL_SIN_HI 2
+#define SINCOSL_SIN_LO 3
extern const __float128 __sincosq_table[];
__float128
-__quadmath_kernel_sinq (__float128 x, __float128 y, int iy)
+__quadmath_kernel_sinq(__float128 x, __float128 y, int iy)
{
__float128 h, l, z, sin_l, cos_l_m1;
int64_t ix;
@@ -101,7 +100,7 @@ __quadmath_kernel_sinq (__float128 x, __float128 y, int iy)
else
{
/* So that we don't have to use too large polynomial, we find
- l and h such that x = l + h, where fabsl(l) <= 1.0/256 with 83
+ l and h such that x = l + h, where fabsq(l) <= 1.0/256 with 83
possible values for h. We look up cosq(h) and sinq(h) in
pre-computed tables, compute cosq(l) and sinq(l) using a
Chebyshev polynomial of degree 10(11) and compute
@@ -125,10 +124,10 @@ __quadmath_kernel_sinq (__float128 x, __float128 y, int iy)
z = l * l;
sin_l = l*(ONE+z*(SSIN1+z*(SSIN2+z*(SSIN3+z*(SSIN4+z*SSIN5)))));
cos_l_m1 = z*(SCOS1+z*(SCOS2+z*(SCOS3+z*(SCOS4+z*SCOS5))));
- z = __sincosq_table [index + SINCOSQ_SIN_HI]
- + (__sincosq_table [index + SINCOSQ_SIN_LO]
- + (__sincosq_table [index + SINCOSQ_SIN_HI] * cos_l_m1)
- + (__sincosq_table [index + SINCOSQ_COS_HI] * sin_l));
+ z = __sincosq_table [index + SINCOSL_SIN_HI]
+ + (__sincosq_table [index + SINCOSL_SIN_LO]
+ + (__sincosq_table [index + SINCOSL_SIN_HI] * cos_l_m1)
+ + (__sincosq_table [index + SINCOSL_COS_HI] * sin_l));
return (ix < 0) ? -z : z;
}
}
diff --git a/libquadmath/math/tanhq.c b/libquadmath/math/tanhq.c
index 6b60dbf1b2f..21c0f937d60 100644
--- a/libquadmath/math/tanhq.c
+++ b/libquadmath/math/tanhq.c
@@ -1,5 +1,5 @@
-/* s_tanhl.c -- __float128 version of s_tanh.c.
- * Conversion to __float128 by Ulrich Drepper,
+/* s_tanhl.c -- long double version of s_tanh.c.
+ * Conversion to long double by Ulrich Drepper,
* Cygnus Support, drepper@cygnus.com.
*/
@@ -14,36 +14,36 @@
* ====================================================
*/
-/* Changes for 128-bit __float128 contributed by
+/* Changes for 128-bit long double contributed by
Stephen L. Moshier <moshier@na-net.ornl.gov> */
-/* tanhl(x)
+/* tanhq(x)
* Return the Hyperbolic Tangent of x
*
* Method :
* x -x
* e - e
- * 0. tanhl(x) is defined to be -----------
+ * 0. tanhq(x) is defined to be -----------
* x -x
* e + e
- * 1. reduce x to non-negative by tanhl(-x) = -tanhl(x).
- * 2. 0 <= x <= 2**-57 : tanhl(x) := x*(one+x)
+ * 1. reduce x to non-negative by tanhq(-x) = -tanhq(x).
+ * 2. 0 <= x <= 2**-57 : tanhq(x) := x*(one+x)
* -t
- * 2**-57 < x <= 1 : tanhl(x) := -----; t = expm1l(-2x)
+ * 2**-57 < x <= 1 : tanhq(x) := -----; t = expm1q(-2x)
* t + 2
* 2
- * 1 <= x <= 40.0 : tanhl(x) := 1- ----- ; t=expm1l(2x)
+ * 1 <= x <= 40.0 : tanhq(x) := 1- ----- ; t=expm1q(2x)
* t + 2
- * 40.0 < x <= INF : tanhl(x) := 1.
+ * 40.0 < x <= INF : tanhq(x) := 1.
*
* Special cases:
- * tanhl(NaN) is NaN;
- * only tanhl(0)=0 is exact for finite argument.
+ * tanhq(NaN) is NaN;
+ * only tanhq(0)=0 is exact for finite argument.
*/
#include "quadmath-imp.h"
-static const __float128 one = 1.0Q, two = 2.0Q, tiny = 1.0e-4900Q;
+static const __float128 one = 1.0, two = 2.0, tiny = 1.0e-4900Q;
__float128
tanhq (__float128 x)
@@ -59,11 +59,11 @@ tanhq (__float128 x)
/* x is INF or NaN */
if (ix >= 0x7fff0000)
{
- /* for NaN it's not important which branch: tanhl(NaN) = NaN */
+ /* for NaN it's not important which branch: tanhq(NaN) = NaN */
if (jx & 0x80000000)
- return one / x - one; /* tanhl(-inf)= -1; */
+ return one / x - one; /* tanhq(-inf)= -1; */
else
- return one / x + one; /* tanhl(+inf)=+1 */
+ return one / x + one; /* tanhq(+inf)=+1 */
}
/* |x| < 40 */
diff --git a/libquadmath/math/tanq.c b/libquadmath/math/tanq.c
index d2864f61c7d..bbbce86d7dd 100644
--- a/libquadmath/math/tanq.c
+++ b/libquadmath/math/tanq.c
@@ -1,171 +1,4 @@
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-/*
- Long double expansions are
- Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
- reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under
- the following terms:
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-
-/* __quadmath_kernel_tanq( x, y, k )
- * kernel tan function on [-pi/4, pi/4], pi/4 ~ 0.7854
- * Input x is assumed to be bounded by ~pi/4 in magnitude.
- * Input y is the tail of x.
- * Input k indicates whether tan (if k=1) or
- * -1/tan (if k= -1) is returned.
- *
- * Algorithm
- * 1. Since tan(-x) = -tan(x), we need only to consider positive x.
- * 2. if x < 2^-57, return x with inexact if x!=0.
- * 3. tan(x) is approximated by a rational form x + x^3 / 3 + x^5 R(x^2)
- * on [0,0.67433].
- *
- * Note: tan(x+y) = tan(x) + tan'(x)*y
- * ~ tan(x) + (1+x*x)*y
- * Therefore, for better accuracy in computing tan(x+y), let
- * r = x^3 * R(x^2)
- * then
- * tan(x+y) = x + (x^3 / 3 + (x^2 *(r+y)+y))
- *
- * 4. For x in [0.67433,pi/4], let y = pi/4 - x, then
- * tan(x) = tan(pi/4-y) = (1-tan(y))/(1+tan(y))
- * = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y)))
- */
-
-#include "quadmath-imp.h"
-
-
-
-static const __float128
- one = 1.0Q,
- pio4hi = 7.8539816339744830961566084581987569936977E-1Q,
- pio4lo = 2.1679525325309452561992610065108379921906E-35Q,
-
- /* tan x = x + x^3 / 3 + x^5 T(x^2)/U(x^2)
- 0 <= x <= 0.6743316650390625
- Peak relative error 8.0e-36 */
- TH = 3.333333333333333333333333333333333333333E-1Q,
- T0 = -1.813014711743583437742363284336855889393E7Q,
- T1 = 1.320767960008972224312740075083259247618E6Q,
- T2 = -2.626775478255838182468651821863299023956E4Q,
- T3 = 1.764573356488504935415411383687150199315E2Q,
- T4 = -3.333267763822178690794678978979803526092E-1Q,
-
- U0 = -1.359761033807687578306772463253710042010E8Q,
- U1 = 6.494370630656893175666729313065113194784E7Q,
- U2 = -4.180787672237927475505536849168729386782E6Q,
- U3 = 8.031643765106170040139966622980914621521E4Q,
- U4 = -5.323131271912475695157127875560667378597E2Q;
- /* 1.000000000000000000000000000000000000000E0 */
-
-
-static __float128
-__quadmath_kernel_tanq (__float128 x, __float128 y, int iy)
-{
- __float128 z, r, v, w, s;
- int32_t ix, sign = 1;
- ieee854_float128 u, u1;
-
- u.value = x;
- ix = u.words32.w0 & 0x7fffffff;
- if (ix < 0x3fc60000) /* x < 2**-57 */
- {
- if ((int) x == 0)
- { /* generate inexact */
- if ((ix | u.words32.w1 | u.words32.w2 | u.words32.w3
- | (iy + 1)) == 0)
- return one / fabsq (x);
- else if (iy == 1)
- {
- math_check_force_underflow (x);
- return x;
- }
- else
- return -one / x;
- }
- }
- if (ix >= 0x3ffe5942) /* |x| >= 0.6743316650390625 */
- {
- if ((u.words32.w0 & 0x80000000) != 0)
- {
- x = -x;
- y = -y;
- sign = -1;
- }
- else
- sign = 1;
- z = pio4hi - x;
- w = pio4lo - y;
- x = z + w;
- y = 0.0;
- }
- z = x * x;
- r = T0 + z * (T1 + z * (T2 + z * (T3 + z * T4)));
- v = U0 + z * (U1 + z * (U2 + z * (U3 + z * (U4 + z))));
- r = r / v;
-
- s = z * x;
- r = y + z * (s * r + y);
- r += TH * s;
- w = x + r;
- if (ix >= 0x3ffe5942)
- {
- v = (__float128) iy;
- w = (v - 2.0Q * (x - (w * w / (w + v) - r)));
- if (sign < 0)
- w = -w;
- return w;
- }
- if (iy == 1)
- return w;
- else
- { /* if allow error up to 2 ulp,
- simply return -1.0/(x+r) here */
- /* compute -1.0/(x+r) accurately */
- u1.value = w;
- u1.words32.w2 = 0;
- u1.words32.w3 = 0;
- v = r - (u1.value - x); /* u1+v = r+x */
- z = -1.0 / w;
- u.value = z;
- u.words32.w2 = 0;
- u.words32.w3 = 0;
- s = 1.0 + u.value * u1.value;
- return u.value + z * (s + u.value * v);
- }
-}
-
-
-
-
-
-
-
-/* tanq.c -- __float128 version of s_tan.c.
+/* s_tanl.c -- long double version of s_tan.c.
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
@@ -181,11 +14,11 @@ __quadmath_kernel_tanq (__float128 x, __float128 y, int iy)
* ====================================================
*/
-/* tanl(x)
+/* tanq(x)
* Return tangent function of x.
*
* kernel function:
- * __quadmath_kernel_tanq ... tangent function on [-pi/4,pi/4]
+ * __quadmath_kernel_tanq ... tangent function on [-pi/4,pi/4]
* __quadmath_rem_pio2q ... argument reduction routine
*
* Method.
@@ -211,11 +44,11 @@ __quadmath_kernel_tanq (__float128 x, __float128 y, int iy)
* TRIG(x) returns trig(x) nearly rounded
*/
+#include "quadmath-imp.h"
-__float128
-tanq (__float128 x)
+__float128 tanq(__float128 x)
{
- __float128 y[2],z=0.0Q;
+ __float128 y[2],z=0;
int64_t n, ix;
/* High word of x. */
@@ -225,10 +58,12 @@ tanq (__float128 x)
ix &= 0x7fffffffffffffffLL;
if(ix <= 0x3ffe921fb54442d1LL) return __quadmath_kernel_tanq(x,z,1);
- /* tanl(Inf or NaN) is NaN */
+ /* tanq(Inf or NaN) is NaN */
else if (ix>=0x7fff000000000000LL) {
if (ix == 0x7fff000000000000LL) {
GET_FLT128_LSW64(n,x);
+ if (n == 0)
+ errno = EDOM;
}
return x-x; /* NaN */
}
@@ -236,7 +71,7 @@ tanq (__float128 x)
/* argument reduction needed */
else {
n = __quadmath_rem_pio2q(x,y);
- /* 1 -- n even, -1 -- n odd */
- return __quadmath_kernel_tanq(y[0],y[1],1-((n&1)<<1));
+ return __quadmath_kernel_tanq(y[0],y[1],1-((n&1)<<1)); /* 1 -- n even
+ -1 -- n odd */
}
}
diff --git a/libquadmath/math/tanq_kernel.c b/libquadmath/math/tanq_kernel.c
new file mode 100644
index 00000000000..2de3a11b637
--- /dev/null
+++ b/libquadmath/math/tanq_kernel.c
@@ -0,0 +1,165 @@
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ Long double expansions are
+ Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
+ and are incorporated herein by permission of the author. The author
+ reserves the right to distribute this material elsewhere under different
+ copying permissions. These modifications are distributed here under
+ the following terms:
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* __quadmath_kernel_tanq( x, y, k )
+ * kernel tan function on [-pi/4, pi/4], pi/4 ~ 0.7854
+ * Input x is assumed to be bounded by ~pi/4 in magnitude.
+ * Input y is the tail of x.
+ * Input k indicates whether tan (if k=1) or
+ * -1/tan (if k= -1) is returned.
+ *
+ * Algorithm
+ * 1. Since tan(-x) = -tan(x), we need only to consider positive x.
+ * 2. if x < 2^-57, return x with inexact if x!=0.
+ * 3. tan(x) is approximated by a rational form x + x^3 / 3 + x^5 R(x^2)
+ * on [0,0.67433].
+ *
+ * Note: tan(x+y) = tan(x) + tan'(x)*y
+ * ~ tan(x) + (1+x*x)*y
+ * Therefore, for better accuracy in computing tan(x+y), let
+ * r = x^3 * R(x^2)
+ * then
+ * tan(x+y) = x + (x^3 / 3 + (x^2 *(r+y)+y))
+ *
+ * 4. For x in [0.67433,pi/4], let y = pi/4 - x, then
+ * tan(x) = tan(pi/4-y) = (1-tan(y))/(1+tan(y))
+ * = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y)))
+ */
+
+#include "quadmath-imp.h"
+
+static const __float128
+ one = 1,
+ pio4hi = 7.8539816339744830961566084581987569936977E-1Q,
+ pio4lo = 2.1679525325309452561992610065108379921906E-35Q,
+
+ /* tan x = x + x^3 / 3 + x^5 T(x^2)/U(x^2)
+ 0 <= x <= 0.6743316650390625
+ Peak relative error 8.0e-36 */
+ TH = 3.333333333333333333333333333333333333333E-1Q,
+ T0 = -1.813014711743583437742363284336855889393E7Q,
+ T1 = 1.320767960008972224312740075083259247618E6Q,
+ T2 = -2.626775478255838182468651821863299023956E4Q,
+ T3 = 1.764573356488504935415411383687150199315E2Q,
+ T4 = -3.333267763822178690794678978979803526092E-1Q,
+
+ U0 = -1.359761033807687578306772463253710042010E8Q,
+ U1 = 6.494370630656893175666729313065113194784E7Q,
+ U2 = -4.180787672237927475505536849168729386782E6Q,
+ U3 = 8.031643765106170040139966622980914621521E4Q,
+ U4 = -5.323131271912475695157127875560667378597E2Q;
+ /* 1.000000000000000000000000000000000000000E0 */
+
+
+__float128
+__quadmath_kernel_tanq (__float128 x, __float128 y, int iy)
+{
+ __float128 z, r, v, w, s;
+ int32_t ix, sign;
+ ieee854_float128 u, u1;
+
+ u.value = x;
+ ix = u.words32.w0 & 0x7fffffff;
+ if (ix < 0x3fc60000) /* x < 2**-57 */
+ {
+ if ((int) x == 0)
+ { /* generate inexact */
+ if ((ix | u.words32.w1 | u.words32.w2 | u.words32.w3
+ | (iy + 1)) == 0)
+ return one / fabsq (x);
+ else if (iy == 1)
+ {
+ math_check_force_underflow (x);
+ return x;
+ }
+ else
+ return -one / x;
+ }
+ }
+ if (ix >= 0x3ffe5942) /* |x| >= 0.6743316650390625 */
+ {
+ if ((u.words32.w0 & 0x80000000) != 0)
+ {
+ x = -x;
+ y = -y;
+ sign = -1;
+ }
+ else
+ sign = 1;
+ z = pio4hi - x;
+ w = pio4lo - y;
+ x = z + w;
+ y = 0.0;
+ }
+ z = x * x;
+ r = T0 + z * (T1 + z * (T2 + z * (T3 + z * T4)));
+ v = U0 + z * (U1 + z * (U2 + z * (U3 + z * (U4 + z))));
+ r = r / v;
+
+ s = z * x;
+ r = y + z * (s * r + y);
+ r += TH * s;
+ w = x + r;
+ if (ix >= 0x3ffe5942)
+ {
+ v = (__float128) iy;
+ w = (v - 2.0 * (x - (w * w / (w + v) - r)));
+ /* SIGN is set for arguments that reach this code, but not
+ otherwise, resulting in warnings that it may be used
+ uninitialized although in the cases where it is used it has
+ always been set. */
+
+
+ if (sign < 0)
+ w = -w;
+
+ return w;
+ }
+ if (iy == 1)
+ return w;
+ else
+ { /* if allow error up to 2 ulp,
+ simply return -1.0/(x+r) here */
+ /* compute -1.0/(x+r) accurately */
+ u1.value = w;
+ u1.words32.w2 = 0;
+ u1.words32.w3 = 0;
+ v = r - (u1.value - x); /* u1+v = r+x */
+ z = -1.0 / w;
+ u.value = z;
+ u.words32.w2 = 0;
+ u.words32.w3 = 0;
+ s = 1.0 + u.value * u1.value;
+ return u.value + z * (s + u.value * v);
+ }
+}
diff --git a/libquadmath/math/tgammaq.c b/libquadmath/math/tgammaq.c
index a07d5831de0..03eae0d13be 100644
--- a/libquadmath/math/tgammaq.c
+++ b/libquadmath/math/tgammaq.c
@@ -1,8 +1,8 @@
/* Implementation of gamma function according to ISO C.
- Copyright (C) 1997, 1999, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
- Jakub Jelinek <jj@ultra.linux.cz, 1999.
+ Jakub Jelinek <jj@ultra.linux.cz, 1999.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -15,39 +15,209 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
+__float128
+tgammaq (__float128 x)
+{
+ int sign;
+ __float128 ret;
+ ret = __quadmath_gammaq_r (x, &sign);
+ return sign < 0 ? -ret : ret;
+}
+
+/* Coefficients B_2k / 2k(2k-1) of x^-(2k-1) inside exp in Stirling's
+ approximation to gamma function. */
+
+static const __float128 gamma_coeff[] =
+ {
+ 0x1.5555555555555555555555555555p-4Q,
+ -0xb.60b60b60b60b60b60b60b60b60b8p-12Q,
+ 0x3.4034034034034034034034034034p-12Q,
+ -0x2.7027027027027027027027027028p-12Q,
+ 0x3.72a3c5631fe46ae1d4e700dca8f2p-12Q,
+ -0x7.daac36664f1f207daac36664f1f4p-12Q,
+ 0x1.a41a41a41a41a41a41a41a41a41ap-8Q,
+ -0x7.90a1b2c3d4e5f708192a3b4c5d7p-8Q,
+ 0x2.dfd2c703c0cfff430edfd2c703cp-4Q,
+ -0x1.6476701181f39edbdb9ce625987dp+0Q,
+ 0xd.672219167002d3a7a9c886459cp+0Q,
+ -0x9.cd9292e6660d55b3f712eb9e07c8p+4Q,
+ 0x8.911a740da740da740da740da741p+8Q,
+ -0x8.d0cc570e255bf59ff6eec24b49p+12Q,
+ };
+
+#define NCOEFF (sizeof (gamma_coeff) / sizeof (gamma_coeff[0]))
+/* Return gamma (X), for positive X less than 1775, in the form R *
+ 2^(*EXP2_ADJ), where R is the return value and *EXP2_ADJ is set to
+ avoid overflow or underflow in intermediate calculations. */
+
+static __float128
+gammal_positive (__float128 x, int *exp2_adj)
+{
+ int local_signgam;
+ if (x < 0.5Q)
+ {
+ *exp2_adj = 0;
+ return expq (__quadmath_lgammaq_r (x + 1, &local_signgam)) / x;
+ }
+ else if (x <= 1.5Q)
+ {
+ *exp2_adj = 0;
+ return expq (__quadmath_lgammaq_r (x, &local_signgam));
+ }
+ else if (x < 12.5Q)
+ {
+ /* Adjust into the range for using exp (lgamma). */
+ *exp2_adj = 0;
+ __float128 n = ceilq (x - 1.5Q);
+ __float128 x_adj = x - n;
+ __float128 eps;
+ __float128 prod = __quadmath_gamma_productq (x_adj, 0, n, &eps);
+ return (expq (__quadmath_lgammaq_r (x_adj, &local_signgam))
+ * prod * (1 + eps));
+ }
+ else
+ {
+ __float128 eps = 0;
+ __float128 x_eps = 0;
+ __float128 x_adj = x;
+ __float128 prod = 1;
+ if (x < 24)
+ {
+ /* Adjust into the range for applying Stirling's
+ approximation. */
+ __float128 n = ceilq (24 - x);
+ x_adj = x + n;
+ x_eps = (x - (x_adj - n));
+ prod = __quadmath_gamma_productq (x_adj - n, x_eps, n, &eps);
+ }
+ /* The result is now gamma (X_ADJ + X_EPS) / (PROD * (1 + EPS)).
+ Compute gamma (X_ADJ + X_EPS) using Stirling's approximation,
+ starting by computing pow (X_ADJ, X_ADJ) with a power of 2
+ factored out. */
+ __float128 exp_adj = -eps;
+ __float128 x_adj_int = roundq (x_adj);
+ __float128 x_adj_frac = x_adj - x_adj_int;
+ int x_adj_log2;
+ __float128 x_adj_mant = frexpq (x_adj, &x_adj_log2);
+ if (x_adj_mant < M_SQRT1_2q)
+ {
+ x_adj_log2--;
+ x_adj_mant *= 2;
+ }
+ *exp2_adj = x_adj_log2 * (int) x_adj_int;
+ __float128 ret = (powq (x_adj_mant, x_adj)
+ * exp2q (x_adj_log2 * x_adj_frac)
+ * expq (-x_adj)
+ * sqrtq (2 * M_PIq / x_adj)
+ / prod);
+ exp_adj += x_eps * logq (x_adj);
+ __float128 bsum = gamma_coeff[NCOEFF - 1];
+ __float128 x_adj2 = x_adj * x_adj;
+ for (size_t i = 1; i <= NCOEFF - 1; i++)
+ bsum = bsum / x_adj2 + gamma_coeff[NCOEFF - 1 - i];
+ exp_adj += bsum / x_adj;
+ return ret + ret * expm1q (exp_adj);
+ }
+}
__float128
-tgammaq (__float128 x)
+__quadmath_gammaq_r (__float128 x, int *signgamp)
{
- /* We don't have a real gamma implementation now. We'll use lgamma
- and the exp function. But due to the required boundary
- conditions we must check some values separately. */
int64_t hx;
uint64_t lx;
- __float128 res;
- int sign;
+ __float128 ret;
GET_FLT128_WORDS64 (hx, lx, x);
if (((hx & 0x7fffffffffffffffLL) | lx) == 0)
- /* Return value for x == 0 is Inf with divide by zero exception. */
- return 1.0 / x;
-
+ {
+ /* Return value for x == 0 is Inf with divide by zero exception. */
+ *signgamp = 0;
+ return 1.0 / x;
+ }
if (hx < 0 && (uint64_t) hx < 0xffff000000000000ULL && rintq (x) == x)
- /* Return value for integer x < 0 is NaN with invalid exception. */
- return (x - x) / (x - x);
-
+ {
+ /* Return value for integer x < 0 is NaN with invalid exception. */
+ *signgamp = 0;
+ return (x - x) / (x - x);
+ }
if (hx == 0xffff000000000000ULL && lx == 0)
- /* x == -Inf. According to ISO this is NaN. */
- return x - x;
+ {
+ /* x == -Inf. According to ISO this is NaN. */
+ *signgamp = 0;
+ return x - x;
+ }
+ if ((hx & 0x7fff000000000000ULL) == 0x7fff000000000000ULL)
+ {
+ /* Positive infinity (return positive infinity) or NaN (return
+ NaN). */
+ *signgamp = 0;
+ return x + x;
+ }
- /* XXX FIXME. */
- res = expq (lgammaq (x));
- return signbitq (x) ? -res : res;
+ if (x >= 1756)
+ {
+ /* Overflow. */
+ *signgamp = 0;
+ return FLT128_MAX * FLT128_MAX;
+ }
+ else
+ {
+ SET_RESTORE_ROUNDF128 (FE_TONEAREST);
+ if (x > 0)
+ {
+ *signgamp = 0;
+ int exp2_adj;
+ ret = gammal_positive (x, &exp2_adj);
+ ret = scalbnq (ret, exp2_adj);
+ }
+ else if (x >= -FLT128_EPSILON / 4)
+ {
+ *signgamp = 0;
+ ret = 1 / x;
+ }
+ else
+ {
+ __float128 tx = truncq (x);
+ *signgamp = (tx == 2 * truncq (tx / 2)) ? -1 : 1;
+ if (x <= -1775)
+ /* Underflow. */
+ ret = FLT128_MIN * FLT128_MIN;
+ else
+ {
+ __float128 frac = tx - x;
+ if (frac > 0.5Q)
+ frac = 1 - frac;
+ __float128 sinpix = (frac <= 0.25Q
+ ? sinq (M_PIq * frac)
+ : cosq (M_PIq * (0.5Q - frac)));
+ int exp2_adj;
+ ret = M_PIq / (-x * sinpix
+ * gammal_positive (-x, &exp2_adj));
+ ret = scalbnq (ret, -exp2_adj);
+ math_check_force_underflow_nonneg (ret);
+ }
+ }
+ }
+ if (isinfq (ret) && x != 0)
+ {
+ if (*signgamp < 0)
+ return -(-copysignq (FLT128_MAX, ret) * FLT128_MAX);
+ else
+ return copysignq (FLT128_MAX, ret) * FLT128_MAX;
+ }
+ else if (ret == 0)
+ {
+ if (*signgamp < 0)
+ return -(-copysignq (FLT128_MIN, ret) * FLT128_MIN);
+ else
+ return copysignq (FLT128_MIN, ret) * FLT128_MIN;
+ }
+ else
+ return ret;
}
diff --git a/libquadmath/math/tgammaq_product.c b/libquadmath/math/tgammaq_product.c
new file mode 100644
index 00000000000..8f9e56dbac2
--- /dev/null
+++ b/libquadmath/math/tgammaq_product.c
@@ -0,0 +1,43 @@
+/* Compute a product of X, X+1, ..., with an error estimate.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "quadmath-imp.h"
+
+/* Compute the product of X + X_EPS, X + X_EPS + 1, ..., X + X_EPS + N
+ - 1, in the form R * (1 + *EPS) where the return value R is an
+ approximation to the product and *EPS is set to indicate the
+ approximate error in the return value. X is such that all the
+ values X + 1, ..., X + N - 1 are exactly representable, and X_EPS /
+ X is small enough that factors quadratic in it can be
+ neglected. */
+
+__float128
+__quadmath_gamma_productq (__float128 x, __float128 x_eps, int n, __float128 *eps)
+{
+ SET_RESTORE_ROUNDF128 (FE_TONEAREST);
+ __float128 ret = x;
+ *eps = x_eps / x;
+ for (int i = 1; i < n; i++)
+ {
+ *eps += x_eps / (x + i);
+ __float128 lo;
+ mul_splitq (&ret, &lo, ret, x + i);
+ *eps += lo / ret;
+ }
+ return ret;
+}
diff --git a/libquadmath/math/truncq.c b/libquadmath/math/truncq.c
index 607c24985e3..2b9f2fc6609 100644
--- a/libquadmath/math/truncq.c
+++ b/libquadmath/math/truncq.c
@@ -1,5 +1,5 @@
/* Truncate argument to nearest integral value not larger than the argument.
- Copyright (C) 1997-2017 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
Jakub Jelinek <jj@ultra.linux.cz>, 1999.
@@ -15,12 +15,12 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
-#include "quadmath-imp.h"
+#define NO_MATH_REDIRECT
+#include "quadmath-imp.h"
__float128
truncq (__float128 x)
diff --git a/libquadmath/math/x2y2m1q.c b/libquadmath/math/x2y2m1q.c
index 90bbc2f605d..f58b38afbc3 100644
--- a/libquadmath/math/x2y2m1q.c
+++ b/libquadmath/math/x2y2m1q.c
@@ -1,5 +1,5 @@
/* Compute x^2 + y^2 - 1, without large cancellation error.
- Copyright (C) 2012 Free Software Foundation, Inc.
+ Copyright (C) 2012-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +17,6 @@
<http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
-#include <stdlib.h>
/* Calculate X + Y exactly and store the result in *HI + *LO. It is
given that |X| >= |Y| and the values are small enough that no
@@ -31,18 +30,6 @@ add_split (__float128 *hi, __float128 *lo, __float128 x, __float128 y)
*lo = (x - *hi) + y;
}
-/* Calculate X * Y exactly and store the result in *HI + *LO. It is
- given that the values are small enough that no overflow occurs and
- large enough (or zero) that no underflow occurs. */
-
-static inline void
-mul_split (__float128 *hi, __float128 *lo, __float128 x, __float128 y)
-{
- /* Fast built-in fused multiply-add. */
- *hi = x * y;
- *lo = fmaq (x, y, -*hi);
-}
-
/* Compare absolute values of floating-point values pointed to by P
and Q for qsort. */
@@ -60,34 +47,26 @@ compare (const void *p, const void *q)
}
/* Return X^2 + Y^2 - 1, computed without large cancellation error.
- It is given that 1 > X >= Y >= epsilon / 2, and that either X >=
- 0.75 or Y >= 0.5. */
+ It is given that 1 > X >= Y >= epsilon / 2, and that X^2 + Y^2 >=
+ 0.5. */
__float128
__quadmath_x2y2m1q (__float128 x, __float128 y)
{
- __float128 vals[4];
- size_t i;
-
- /* FIXME: SET_RESTORE_ROUNDL (FE_TONEAREST); */
- mul_split (&vals[1], &vals[0], x, x);
- mul_split (&vals[3], &vals[2], y, y);
- if (x >= 0.75Q)
- vals[1] -= 1.0Q;
- else
- {
- vals[1] -= 0.5Q;
- vals[3] -= 0.5Q;
- }
- qsort (vals, 4, sizeof (__float128), compare);
+ __float128 vals[5];
+ SET_RESTORE_ROUNDF128 (FE_TONEAREST);
+ mul_splitq (&vals[1], &vals[0], x, x);
+ mul_splitq (&vals[3], &vals[2], y, y);
+ vals[4] = -1;
+ qsort (vals, 5, sizeof (__float128), compare);
/* Add up the values so that each element of VALS has absolute value
at most equal to the last set bit of the next nonzero
element. */
- for (i = 0; i <= 2; i++)
+ for (size_t i = 0; i <= 3; i++)
{
add_split (&vals[i + 1], &vals[i], vals[i + 1], vals[i]);
- qsort (vals + i + 1, 3 - i, sizeof (__float128), compare);
+ qsort (vals + i + 1, 4 - i, sizeof (__float128), compare);
}
/* Now any error from this addition will be small. */
- return vals[3] + vals[2] + vals[1] + vals[0];
+ return vals[4] + vals[3] + vals[2] + vals[1] + vals[0];
}
diff --git a/libquadmath/quadmath-imp.h b/libquadmath/quadmath-imp.h
index ed186144e75..8d22248504a 100644
--- a/libquadmath/quadmath-imp.h
+++ b/libquadmath/quadmath-imp.h
@@ -21,10 +21,16 @@ Boston, MA 02110-1301, USA. */
#ifndef QUADMATH_IMP_H
#define QUADMATH_IMP_H
+#include <errno.h>
+#include <limits.h>
+#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include "quadmath.h"
#include "config.h"
+#ifdef HAVE_FENV_H
+# include <fenv.h>
+#endif
/* Under IEEE 754, an architecture may determine tininess of
@@ -36,6 +42,10 @@ Boston, MA 02110-1301, USA. */
#define TININESS_AFTER_ROUNDING 1
+#define HIGH_ORDER_BIT_IS_SET_FOR_SNAN 0
+
+#define FIX_FLT128_LONG_CONVERT_OVERFLOW 0
+#define FIX_FLT128_LLONG_CONVERT_OVERFLOW 0
/* Prototypes for internal functions. */
extern int32_t __quadmath_rem_pio2q (__float128, __float128 *);
@@ -43,9 +53,24 @@ extern void __quadmath_kernel_sincosq (__float128, __float128, __float128 *,
__float128 *, int);
extern __float128 __quadmath_kernel_sinq (__float128, __float128, int);
extern __float128 __quadmath_kernel_cosq (__float128, __float128);
+extern __float128 __quadmath_kernel_tanq (__float128, __float128, int);
+extern __float128 __quadmath_gamma_productq (__float128, __float128, int,
+ __float128 *);
+extern __float128 __quadmath_gammaq_r (__float128, int *);
+extern __float128 __quadmath_lgamma_negq (__float128, int *);
+extern __float128 __quadmath_lgamma_productq (__float128, __float128,
+ __float128, int);
+extern __float128 __quadmath_lgammaq_r (__float128, int *);
extern __float128 __quadmath_x2y2m1q (__float128 x, __float128 y);
-extern int __quadmath_isinf_nsq (__float128 x);
+extern __complex128 __quadmath_kernel_casinhq (__complex128, int);
+static inline void
+mul_splitq (__float128 *hi, __float128 *lo, __float128 x, __float128 y)
+{
+ /* Fast built-in fused multiply-add. */
+ *hi = x * y;
+ *lo = fmaq (x, y, -*hi);
+}
@@ -227,4 +252,86 @@ do { \
} \
while (0)
+/* Likewise, for both real and imaginary parts of a complex
+ result. */
+#define math_check_force_underflow_complex(x) \
+ do \
+ { \
+ __typeof (x) force_underflow_complex_tmp = (x); \
+ math_check_force_underflow (__real__ force_underflow_complex_tmp); \
+ math_check_force_underflow (__imag__ force_underflow_complex_tmp); \
+ } \
+ while (0)
+
+#ifndef HAVE_FENV_H
+# define feraiseexcept(arg) ((void) 0)
+typedef int fenv_t;
+# define feholdexcept(arg) ((void) 0)
+# define fesetround(arg) ((void) 0)
+# define feupdateenv(arg) ((void) (arg))
+# define fesetenv(arg) ((void) (arg))
+# define fetestexcept(arg) 0
+# define feclearexcept(arg) ((void) 0)
+#else
+# ifndef HAVE_FEHOLDEXCEPT
+# define feholdexcept(arg) ((void) 0)
+# endif
+# ifndef HAVE_FESETROUND
+# define fesetround(arg) ((void) 0)
+# endif
+# ifndef HAVE_FEUPDATEENV
+# define feupdateenv(arg) ((void) (arg))
+# endif
+# ifndef HAVE_FESETENV
+# define fesetenv(arg) ((void) (arg))
+# endif
+# ifndef HAVE_FETESTEXCEPT
+# define fetestexcept(arg) 0
+# endif
+#endif
+
+#ifndef __glibc_likely
+# define __glibc_likely(cond) __builtin_expect ((cond), 1)
+#endif
+
+#ifndef __glibc_unlikely
+# define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
+#endif
+
+#if defined HAVE_FENV_H && defined HAVE_FESETROUND && defined HAVE_FEUPDATEENV
+struct rm_ctx
+{
+ fenv_t env;
+ bool updated_status;
+};
+
+# define SET_RESTORE_ROUNDF128(RM) \
+ struct rm_ctx ctx __attribute__((cleanup (libc_feresetround_ctx))); \
+ libc_feholdsetround_ctx (&ctx, (RM))
+
+static inline __attribute__ ((always_inline)) void
+libc_feholdsetround_ctx (struct rm_ctx *ctx, int round)
+{
+ ctx->updated_status = false;
+
+ /* Update rounding mode only if different. */
+ if (__glibc_unlikely (round != fegetround ()))
+ {
+ ctx->updated_status = true;
+ fegetenv (&ctx->env);
+ fesetround (round);
+ }
+}
+
+static inline __attribute__ ((always_inline)) void
+libc_feresetround_ctx (struct rm_ctx *ctx)
+{
+ /* Restore the rounding mode if updated. */
+ if (__glibc_unlikely (ctx->updated_status))
+ feupdateenv (&ctx->env);
+}
+#else
+# define SET_RESTORE_ROUNDF128(RM) ((void) 0)
+#endif
+
#endif
diff --git a/libquadmath/quadmath.h b/libquadmath/quadmath.h
index 95487b7d6ef..76275b51b62 100644
--- a/libquadmath/quadmath.h
+++ b/libquadmath/quadmath.h
@@ -58,6 +58,7 @@ extern __float128 coshq (__float128) __quadmath_throw;
extern __float128 cosq (__float128) __quadmath_throw;
extern __float128 erfq (__float128) __quadmath_throw;
extern __float128 erfcq (__float128) __quadmath_throw;
+extern __float128 exp2q (__float128) __quadmath_throw;
extern __float128 expq (__float128) __quadmath_throw;
extern __float128 expm1q (__float128) __quadmath_throw;
extern __float128 fabsq (__float128) __quadmath_throw;
@@ -73,6 +74,7 @@ extern __float128 hypotq (__float128, __float128) __quadmath_throw;
extern int isinfq (__float128) __quadmath_throw;
extern int ilogbq (__float128) __quadmath_throw;
extern int isnanq (__float128) __quadmath_throw;
+extern int issignalingq (__float128) __quadmath_throw;
extern __float128 j0q (__float128) __quadmath_throw;
extern __float128 j1q (__float128) __quadmath_throw;
extern __float128 jnq (int, __float128) __quadmath_throw;
diff --git a/libquadmath/quadmath.map b/libquadmath/quadmath.map
index fe816e3215d..dbdda7029de 100644
--- a/libquadmath/quadmath.map
+++ b/libquadmath/quadmath.map
@@ -101,3 +101,9 @@ QUADMATH_1.1 {
global:
logbq;
} QUADMATH_1.0;
+
+QUADMATH_1.2 {
+ global:
+ exp2q;
+ issignalingq;
+} QUADMATH_1.1;
diff --git a/libquadmath/quadmath_weak.h b/libquadmath/quadmath_weak.h
index db5d529612a..f7100ded224 100644
--- a/libquadmath/quadmath_weak.h
+++ b/libquadmath/quadmath_weak.h
@@ -50,6 +50,7 @@ __qmath3 (coshq)
__qmath3 (cosq)
__qmath3 (erfq)
__qmath3 (erfcq)
+__qmath3 (exp2q)
__qmath3 (expq)
__qmath3 (expm1q)
__qmath3 (fabsq)
@@ -65,6 +66,7 @@ __qmath3 (hypotq)
__qmath3 (ilogbq)
__qmath3 (isinfq)
__qmath3 (isnanq)
+__qmath3 (issignalingq)
__qmath3 (j0q)
__qmath3 (j1q)
__qmath3 (jnq)
diff --git a/libquadmath/update-quadmath.py b/libquadmath/update-quadmath.py
new file mode 100755
index 00000000000..ca6c9f0c7c7
--- /dev/null
+++ b/libquadmath/update-quadmath.py
@@ -0,0 +1,255 @@
+#!/usr/bin/python3
+# Update libquadmath code from glibc sources.
+# Copyright (C) 2018 Free Software Foundation, Inc.
+# This file is part of the libquadmath library.
+#
+# Libquadmath is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# Libquadmath is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with libquadmath; if not, see
+# <https://www.gnu.org/licenses/>.
+
+# Usage: update-quadmath.py glibc_srcdir quadmath_srcdir
+
+import argparse
+from collections import defaultdict
+import os.path
+import re
+
+
+def replace_in_file(repl_map, extra_map, src, dest):
+ """Apply the replacements in repl_map, then those in extra_map, to the
+ file src, producing dest."""
+ with open(src, 'r') as src_file:
+ text = src_file.read()
+ for re_src, re_repl in sorted(repl_map.items()):
+ text = re.sub(re_src, re_repl, text)
+ for re_src, re_repl in sorted(extra_map.items()):
+ text = re.sub(re_src, re_repl, text)
+ text = text.rstrip() + '\n'
+ with open(dest, 'w') as dest_file:
+ dest_file.write(text)
+
+
+def update_sources(glibc_srcdir, quadmath_srcdir):
+ """Update libquadmath sources."""
+ glibc_ldbl128 = os.path.join(glibc_srcdir, 'sysdeps/ieee754/ldbl-128')
+ glibc_math = os.path.join(glibc_srcdir, 'math')
+ quadmath_math = os.path.join(quadmath_srcdir, 'math')
+ float128_h = os.path.join(glibc_srcdir,
+ 'sysdeps/ieee754/float128/float128_private.h')
+ repl_map = {}
+ # Use float128_private.h to get an initial list of names to
+ # replace for libquadmath.
+ repl_names = {}
+ with open(float128_h, 'r') as header:
+ for line in header:
+ line = line.strip()
+ if not line.startswith('#define '):
+ continue
+ match = re.fullmatch('^#define[ \t]+([a-zA-Z0-9_]+)'
+ '[ \t]+([a-zA-Z0-9_]+)', line)
+ if not match:
+ continue
+ macro = match.group(1)
+ result = match.group(2)
+ result = result.replace('f128', 'q')
+ result = result.replace('__ieee754_', '')
+ if result not in ('__expq_table', '__sincosq_table',
+ '__builtin_signbit'):
+ result = result.replace('__', '')
+ result = result.replace('_do_not_use', '')
+ if result in ('rem_pio2q', 'kernel_sincosq', 'kernel_sinq',
+ 'kernel_cosq', 'kernel_tanq', 'gammaq_r',
+ 'gamma_productq', 'lgamma_negq', 'lgamma_productq',
+ 'lgammaq_r', 'x2y2m1q'):
+ # Internal function names, for which the above removal
+ # of leading '__' was inappropriate and a leading
+ # '__quadmath_' needs adding instead. In the
+ # libquadmath context, lgammaq_r is an internal name.
+ result = '__quadmath_' + result
+ if result == 'ieee854_float128_shape_type':
+ result = 'ieee854_float128'
+ if result == 'HUGE_VAL_F128':
+ result = 'HUGE_VALQ'
+ repl_names[macro] = result
+ # More such names that aren't simply defined as object-like macros
+ # in float128_private.h.
+ repl_names['_Float128'] = '__float128'
+ repl_names['SET_RESTORE_ROUNDL'] = 'SET_RESTORE_ROUNDF128'
+ repl_names['parts32'] = 'words32'
+ for macro in ('GET_LDOUBLE_LSW64', 'GET_LDOUBLE_MSW64',
+ 'GET_LDOUBLE_WORDS64', 'SET_LDOUBLE_LSW64',
+ 'SET_LDOUBLE_MSW64', 'SET_LDOUBLE_WORDS64'):
+ repl_names[macro] = macro.replace('LDOUBLE', 'FLT128')
+ # The classication macros are replaced.
+ for macro in ('FP_NAN', 'FP_INFINITE', 'FP_ZERO', 'FP_SUBNORMAL',
+ 'FP_NORMAL'):
+ repl_names[macro] = 'QUAD' + macro
+ for macro in ('fpclassify', 'signbit', 'isnan', 'isinf', 'issignaling'):
+ repl_names[macro] = macro + 'q'
+ repl_names['isfinite'] = 'finiteq'
+ # Map comparison macros to the __builtin forms.
+ for macro in ('isgreater', 'isgreaterequal', 'isless', 'islessequal',
+ 'islessgreater', 'isunordered'):
+ repl_names[macro] = '__builtin_' + macro
+ # Replace macros used in type-generic templates in glibc.
+ repl_names['FLOAT'] = '__float128'
+ repl_names['CFLOAT'] = '__complex128'
+ repl_names['M_NAN'] = 'nanq ("")'
+ repl_names['M_HUGE_VAL'] = 'HUGE_VALQ'
+ repl_names['INFINITY'] = '__builtin_inf ()'
+ for macro in ('MIN_EXP', 'MAX_EXP', 'MIN', 'MAX', 'MANT_DIG', 'EPSILON'):
+ repl_names['M_%s' % macro] = 'FLT128_%s' % macro
+ for macro in ('COPYSIGN', 'FABS', 'SINCOS', 'SCALBN', 'LOG1P', 'ATAN2',
+ 'COSH', 'EXP', 'HYPOT', 'LOG', 'SINH', 'SQRT'):
+ repl_names['M_%s' % macro] = macro.lower() + 'q'
+ # Each such name is replaced when it appears as a whole word.
+ for macro in repl_names:
+ repl_map[r'\b%s\b' % macro] = repl_names[macro]
+ # Also replace the L macro for constants; likewise M_LIT and M_MLIT.
+ repl_map[r'\bL *\((.*?)\)'] = r'\1Q'
+ repl_map[r'\bM_LIT *\((.*?)\)'] = r'\1Q'
+ repl_map[r'\bM_MLIT *\((.*?)\)'] = r'\1q'
+ # M_DECL_FUNC and M_SUF need similar replacements.
+ repl_map[r'\bM_DECL_FUNC *\((?:__)?(?:ieee754_)?(.*?)\)'] = r'\1q'
+ repl_map[r'\bM_SUF *\((?:__)?(?:ieee754_)?(.*?)\)'] = r'\1q'
+ # Further adjustments are then needed for certain internal
+ # functions called via M_SUF.
+ repl_map[r'\bx2y2m1q\b'] = '__quadmath_x2y2m1q'
+ repl_map[r'\bkernel_casinhq\b'] = '__quadmath_kernel_casinhq'
+ # Replace calls to __set_errno.
+ repl_map[r'\b__set_errno *\((.*?)\)'] = r'errno = \1'
+ # Eliminate glibc diagnostic macros.
+ repl_map[r' *\bDIAG_PUSH_NEEDS_COMMENT;'] = ''
+ repl_map[r' *\bDIAG_IGNORE_NEEDS_COMMENT *\(.*?\);'] = ''
+ repl_map[r' *\bDIAG_POP_NEEDS_COMMENT;'] = ''
+ # Different names used in union.
+ repl_map[r'\.d\b'] = '.value'
+ repl_map[r'\bunion ieee854_float128\b'] = 'ieee854_float128'
+ # Calls to alias and hidden_def macros are all eliminated.
+ for macro in ('strong_alias', 'weak_alias', 'libm_alias_ldouble',
+ 'declare_mgen_alias', 'declare_mgen_finite_alias',
+ 'libm_hidden_def', 'mathx_hidden_def'):
+ repl_map[r'\b%s *\(.*?\);?' % macro] = ''
+ # Replace all #includes with a single include of quadmath-imp.h.
+ repl_map['(\n+#include[^\n]*)+\n+'] = '\n\n#include "quadmath-imp.h"\n\n'
+ # Omitted from this list because code comes from more than one
+ # glibc source file: rem_pio2. Omitted because of a union not
+ # currently provided in libquadmath: fma.
+ ldbl_files = {
+ 'e_acoshl.c': 'acoshq.c', 'e_acosl.c': 'acosq.c',
+ 's_asinhl.c': 'asinhq.c', 'e_asinl.c': 'asinq.c',
+ 'e_atan2l.c': 'atan2q.c', 'e_atanhl.c': 'atanhq.c',
+ 's_atanl.c': 'atanq.c', 's_cbrtl.c': 'cbrtq.c', 's_ceill.c': 'ceilq.c',
+ 's_copysignl.c': 'copysignq.c', 'e_coshl.c': 'coshq.c',
+ 's_cosl.c': 'cosq.c', 'k_cosl.c': 'cosq_kernel.c',
+ 's_erfl.c': 'erfq.c', 's_expm1l.c': 'expm1q.c', 'e_expl.c': 'expq.c',
+ 't_expl.h': 'expq_table.h', 's_fabsl.c': 'fabsq.c',
+ 's_finitel.c': 'finiteq.c', 's_floorl.c': 'floorq.c',
+ 'e_fmodl.c': 'fmodq.c', 's_frexpl.c': 'frexpq.c',
+ 'e_lgammal_r.c': 'lgammaq.c', 'lgamma_negl.c': 'lgammaq_neg.c',
+ 'lgamma_productl.c': 'lgammaq_product.c', 'e_hypotl.c': 'hypotq.c',
+ 'e_ilogbl.c': 'ilogbq.c', 's_isinfl.c': 'isinfq.c',
+ 's_isnanl.c': 'isnanq.c', 's_issignalingl.c': 'issignalingq.c',
+ 'e_j0l.c': 'j0q.c', 'e_j1l.c': 'j1q.c', 'e_jnl.c': 'jnq.c',
+ 's_llrintl.c': 'llrintq.c', 's_llroundl.c': 'llroundq.c',
+ 'e_log10l.c': 'log10q.c', 's_log1pl.c': 'log1pq.c',
+ 'e_log2l.c': 'log2q.c', 's_logbl.c': 'logbq.c', 'e_logl.c': 'logq.c',
+ 's_lrintl.c': 'lrintq.c', 's_lroundl.c': 'lroundq.c',
+ 's_modfl.c': 'modfq.c', 's_nearbyintl.c': 'nearbyintq.c',
+ 's_nextafterl.c': 'nextafterq.c', 'e_powl.c': 'powq.c',
+ 'e_remainderl.c': 'remainderq.c', 's_remquol.c': 'remquoq.c',
+ 's_rintl.c': 'rintq.c', 's_roundl.c': 'roundq.c',
+ 's_scalblnl.c': 'scalblnq.c', 's_scalbnl.c': 'scalbnq.c',
+ 's_signbitl.c': 'signbitq.c', 't_sincosl.c': 'sincos_table.c',
+ 's_sincosl.c': 'sincosq.c', 'k_sincosl.c': 'sincosq_kernel.c',
+ 'e_sinhl.c': 'sinhq.c', 's_sinl.c': 'sinq.c',
+ 'k_sinl.c': 'sinq_kernel.c', 's_tanhl.c': 'tanhq.c',
+ 's_tanl.c': 'tanq.c', 'k_tanl.c': 'tanq_kernel.c',
+ 'e_gammal_r.c': 'tgammaq.c', 'gamma_productl.c': 'tgammaq_product.c',
+ 's_truncl.c': 'truncq.c', 'x2y2m1l.c': 'x2y2m1q.c'
+ }
+ template_files = {
+ 's_cacosh_template.c': 'cacoshq.c', 's_cacos_template.c': 'cacosq.c',
+ 's_casinh_template.c': 'casinhq.c',
+ 'k_casinh_template.c': 'casinhq_kernel.c',
+ 's_casin_template.c': 'casinq.c', 's_catanh_template.c': 'catanhq.c',
+ 's_catan_template.c': 'catanq.c', 's_ccosh_template.c': 'ccoshq.c',
+ 's_cexp_template.c': 'cexpq.c', 'cimag_template.c': 'cimagq.c',
+ 's_clog10_template.c': 'clog10q.c', 's_clog_template.c': 'clogq.c',
+ 'conj_template.c': 'conjq.c', 's_cproj_template.c': 'cprojq.c',
+ 'creal_template.c': 'crealq.c', 's_csinh_template.c': 'csinhq.c',
+ 's_csin_template.c': 'csinq.c', 's_csqrt_template.c': 'csqrtq.c',
+ 's_ctanh_template.c': 'ctanhq.c', 's_ctan_template.c': 'ctanq.c',
+ 'e_exp2_template.c': 'exp2q.c', 's_fdim_template.c': 'fdimq.c',
+ 's_fmax_template.c': 'fmaxq.c', 's_fmin_template.c': 'fminq.c',
+ 's_ldexp_template.c': 'ldexpq.c'
+ }
+ # Some files have extra substitutions to apply.
+ extra_maps = defaultdict(dict)
+ extra_maps['expq.c'] = {r'#include "quadmath-imp\.h"\n':
+ '#include "quadmath-imp.h"\n'
+ '#include "expq_table.h"\n'}
+ extra_maps['ilogbq.c'] = {r'#include "quadmath-imp\.h"\n':
+ '#include <math.h>\n'
+ '#include "quadmath-imp.h"\n'
+ '#ifndef FP_ILOGB0\n'
+ '# define FP_ILOGB0 INT_MIN\n'
+ '#endif\n'
+ '#ifndef FP_ILOGBNAN\n'
+ '# define FP_ILOGBNAN INT_MAX\n'
+ '#endif\n',
+ r'return ([A-Z0-9_]+);':
+ r'{ errno = EDOM; feraiseexcept (FE_INVALID); '
+ r'return \1; }'}
+ extra_maps['lgammaq.c'] = {r'#include "quadmath-imp\.h"\n':
+ '#include "quadmath-imp.h"\n'
+ '#ifdef HAVE_MATH_H_SIGNGAM\n'
+ '# include <math.h>\n'
+ '#endif\n'
+ '__float128\n'
+ 'lgammaq (__float128 x)\n'
+ '{\n'
+ '#ifndef HAVE_MATH_H_SIGNGAM\n'
+ ' int signgam;\n'
+ '#endif\n'
+ ' return __quadmath_lgammaq_r (x, &signgam);\n'
+ '}\n'}
+ extra_maps['tgammaq.c'] = {r'#include "quadmath-imp\.h"\n':
+ '#include "quadmath-imp.h"\n'
+ '__float128\n'
+ 'tgammaq (__float128 x)\n'
+ '{\n'
+ ' int sign;\n'
+ ' __float128 ret;\n'
+ ' ret = __quadmath_gammaq_r (x, &sign);\n'
+ ' return sign < 0 ? -ret : ret;\n'
+ '}\n'}
+ for src, dest in ldbl_files.items():
+ replace_in_file(repl_map, extra_maps[dest],
+ os.path.join(glibc_ldbl128, src),
+ os.path.join(quadmath_math, dest))
+ for src, dest in template_files.items():
+ replace_in_file(repl_map, extra_maps[dest],
+ os.path.join(glibc_math, src),
+ os.path.join(quadmath_math, dest))
+
+def main():
+ parser = argparse.ArgumentParser(description='Update libquadmath code.')
+ parser.add_argument('glibc_srcdir', help='glibc source directory')
+ parser.add_argument('quadmath_srcdir', help='libquadmath source directory')
+ args = parser.parse_args()
+ update_sources(args.glibc_srcdir, args.quadmath_srcdir)
+
+
+if __name__ == '__main__':
+ main()