aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
Diffstat (limited to 'math')
-rw-r--r--math/Makefile34
-rw-r--r--math/README.libm-test33
-rw-r--r--math/auto-libm-test-in124
-rw-r--r--math/auto-libm-test-out-acosh826
-rw-r--r--math/auto-libm-test-out-asinh276
-rw-r--r--math/auto-libm-test-out-atanh1590
-rw-r--r--math/auto-libm-test-out-cosh2244
-rw-r--r--math/auto-libm-test-out-hypot8584
-rw-r--r--math/auto-libm-test-out-sinh1260
-rw-r--r--math/gen-auto-libm-tests.c8
-rwxr-xr-xmath/gen-libm-test.py5
-rw-r--r--math/libm-test-asinh.inc4
-rw-r--r--math/libm-test-atanh.inc4
-rw-r--r--math/libm-test-cosh.inc4
-rw-r--r--math/libm-test-driver.c7
-rw-r--r--math/libm-test-exp.inc4
-rw-r--r--math/libm-test-expm1.inc4
-rw-r--r--math/libm-test-hypot.inc32
-rw-r--r--math/libm-test-pow.inc118
-rw-r--r--math/libm-test-sinh.inc4
-rw-r--r--math/libm-test-support.c8
-rw-r--r--math/libm-test-support.h2
-rw-r--r--math/libm-test-tanh.inc4
-rw-r--r--math/test-double-vlen2.h1
-rw-r--r--math/test-double-vlen4.h1
-rw-r--r--math/test-double-vlen8.h1
-rw-r--r--math/test-double.h1
-rw-r--r--math/test-float-vlen16.h1
-rw-r--r--math/test-float-vlen4.h1
-rw-r--r--math/test-float-vlen8.h1
-rw-r--r--math/test-float.h1
-rw-r--r--math/test-float128.h2
-rw-r--r--math/test-float32.h1
-rw-r--r--math/test-float32x.h1
-rw-r--r--math/test-float64.h1
-rw-r--r--math/test-float64x.h2
-rw-r--r--math/test-ldouble.h3
-rw-r--r--math/test-math-inline.h25
-rw-r--r--math/test-math-no-inline.h23
39 files changed, 7562 insertions, 7683 deletions
diff --git a/math/Makefile b/math/Makefile
index e17bc50df3..a26dfc435b 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -303,26 +303,19 @@ generated += libm-test-ulps.h $(libm-test-c-auto) $(libm-test-c-noauto) \
$(libm-test-c-narrow)
libm-tests-base-normal = $(foreach t,$(test-types),test-$(t))
-libm-tests-base-inline = $(foreach t,$(test-types),test-i$(t))
libm-tests-base-narrow = $(foreach t,$(test-type-pairs),test-$(t))
-libm-tests-base = $(libm-tests-base-normal) $(libm-tests-base-inline) \
- $(libm-vec-tests)
+libm-tests-base = $(libm-tests-base-normal) $(libm-vec-tests)
libm-tests-normal = $(foreach t,$(libm-tests-base-normal),\
$(foreach f,$(libm-test-funcs-all),\
$(t)-$(f)))
-libm-tests-inline = $(foreach t,$(libm-tests-base-inline),\
- $(foreach f,$(libm-test-funcs-all),\
- $(t)-$(f)))
libm-tests-narrow = $(foreach t,$(libm-tests-base-narrow),\
$(foreach f,$(libm-test-funcs-narrow),\
$(t)-$(f)))
libm-tests-vector = $(foreach t,$(libmvec-tests),\
$(foreach f,$($(t)-funcs),test-$(t)-$(f)))
-libm-tests = $(libm-tests-normal) $(libm-tests-inline) \
- $(libm-tests-narrow) $(libm-tests-vector)
+libm-tests = $(libm-tests-normal) $(libm-tests-narrow) $(libm-tests-vector)
libm-tests-compat = $(foreach t,$(libm-tests-base-normal) \
- $(libm-tests-base-finite) \
- $(libm-tests-base-inline),\
+ $(libm-tests-base-finite),\
$(foreach f,$(libm-test-funcs-compat),\
$(t)-$(f)))
libm-tests-for-type = $(foreach f,$(libm-test-funcs-all),\
@@ -417,7 +410,6 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
# validated.
libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
-fsignaling-nans
-libm-test-inline-cflags = $(libm-test-fast-math-cflags)
CFLAGS-test-tgmath.c += -fno-builtin
# The following testcase uses very long lines (>3 million), so it may take a
# while to compile it. See: http://llvm.org/bugs/show_bug.cgi?id=14106 and
@@ -493,23 +485,11 @@ $(foreach t,$(libm-tests-normal),$(objpfx)$(t).c): $(objpfx)test-%.c:
( \
echo "#include <test-$$type.h>"; \
echo "#include <test-math-exceptions.h>"; \
- echo "#include <test-math-no-inline.h>"; \
echo "#include <test-math-errno.h>"; \
echo "#include <test-math-scalar.h>"; \
echo "#include <libm-test-$$func.c>"; \
) > $@
-$(foreach t,$(libm-tests-inline),$(objpfx)$(t).c): $(objpfx)test-i%.c:
- type_func=$*; \
- type=$${type_func%%-*}; \
- func=$${type_func#*-}; \
- ( \
- echo "#include <test-$$type.h>"; \
- echo "#include <test-math-inline.h>"; \
- echo "#include <test-math-scalar.h>"; \
- echo "#include <libm-test-$$func.c>"; \
- ) > $@
-
$(foreach t,$(libm-tests-narrow),$(objpfx)$(t).c): $(objpfx)test-%.c:
type_pair_func=$*; \
type_pair=$${type_pair_func%-*}; \
@@ -520,7 +500,6 @@ $(foreach t,$(libm-tests-narrow),$(objpfx)$(t).c): $(objpfx)test-%.c:
echo "#include <test-$$ret_type.h>"; \
echo "#include <test-arg-$$arg_type.h>"; \
echo "#include <test-math-exceptions.h>"; \
- echo "#include <test-math-no-inline.h>"; \
echo "#include <test-math-errno.h>"; \
echo "#include <test-math-narrow.h>"; \
echo "#include <libm-test-narrow-$$func.c>"; \
@@ -570,13 +549,6 @@ object-suffixes-left := $(libm-tests-base-normal)
include $(o-iterator)
define o-iterator-doit
-$(foreach f,$(libm-test-funcs-all),\
- $(objpfx)$(o)-$(f).o): CFLAGS += $(libm-test-inline-cflags)
-endef
-object-suffixes-left := $(libm-tests-base-inline)
-include $(o-iterator)
-
-define o-iterator-doit
$(foreach f,$(libm-test-funcs-narrow),\
$(objpfx)$(o)-$(f).o): CFLAGS += $(libm-test-no-inline-cflags)
endef
diff --git a/math/README.libm-test b/math/README.libm-test
index 53172bbff8..28d7a2ed28 100644
--- a/math/README.libm-test
+++ b/math/README.libm-test
@@ -35,18 +35,14 @@ deviate from the expected results and still be considered correct.
The test drivers "test-double-<func>.c", "test-float-<func>.c", and
"test-ldouble-<func>.c", generated by the Makefile, test the normal
-double, float and long double implementation of libm. The test
-drivers with an 'i' in their name ("test-idouble-<func>.c",
-"test-ifloat-<func>.c", and "test-ildoubl-<func>.c") test the
-corresponding inline functions (where available - otherwise they also
-test the real functions in libm). Each driver selects the desired
-real floating type to exercise the math functions to test with (float,
-double, or long double) by defining a small set of macros just before
-including the generic "libm-test.c" file. Each driver also either
-defines or undefines the __NO_MATH_INLINES macro just before including
-"libm-test-<func>.c" to select either the real or inline functions,
-respectively. Each driver is compiled into a single executable test
-program with the corresponding name.
+double, float and long double implementation of libm. Each driver
+selects the desired real floating type to exercise the math functions
+to test with (float, double, or long double) by defining a small set
+of macros just before including the generic "libm-test.c" file. Each
+driver also either defines or undefines the __NO_MATH_INLINES macro
+just before including "libm-test-<func>.c" to select either the real
+or inline functions, respectively. Each driver is compiled into a
+single executable test program with the corresponding name.
As mentioned above, the "gen-libm-test.py" script looks for a file
named "libm-test-ulps" in the platform specific sysdep directory (or
@@ -100,10 +96,9 @@ Since libm-test-ulps can be generated automatically, just a few notes.
The file contains lines for maximal errors of single functions, like:
Function "yn":
-idouble: 6
+double: 6
-The keywords are float, ifloat, double, idouble, ldouble and ildouble
-(the prefix i stands for inline).
+The keywords are float, double, and ldouble.
Adding tests to libm-test-<func>.inc
====================================
@@ -143,11 +138,9 @@ How to read the test output
Running each test on its own at the default level of verbosity will
print on stdout a line describing the implementation of math functions
-exercised by the test (float, double, or long double), along with
-whether the inline set has been selected, regardless of whether or
-not any inline functions actually exist. This is then followed by
-the details of test failures (if any). The output concludes by
-a summary listing the number of test cases exercised and the number
+exercised by the test (float, double, or long double). This is then
+followed by the details of test failures (if any). The output concludes
+by a summary listing the number of test cases exercised and the number
of test failures uncovered.
For each test failure (and for each test case at higher levels of
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index ee56983d75..f36fea0ea8 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -86,10 +86,10 @@ acos -min_subnorm
acosh 1
acosh 0x1.000002p0
-acosh 0x1.0000000000001p0 no-test-inline
-acosh 0x1.0000000000000002p0 no-test-inline
-acosh 0x1.000000000000000000000000008p0 no-test-inline
-acosh 0x1.0000000000000000000000000001p0 no-test-inline
+acosh 0x1.0000000000001p0
+acosh 0x1.0000000000000002p0
+acosh 0x1.000000000000000000000000008p0
+acosh 0x1.0000000000000000000000000001p0
acosh 1.625
acosh 7
acosh 100
@@ -140,7 +140,7 @@ acosh 0x1.1b836p+0
acosh 0x1.07c956p+0
acosh 0x1.1808eep+0
acosh 0x1.1052c4p+0
-acosh max no-test-inline
+acosh max
add 0 0
add 0 -0
@@ -375,8 +375,8 @@ asinh min
asinh -min
asinh min_subnorm
asinh -min_subnorm
-asinh max no-test-inline
-asinh -max no-test-inline
+asinh max
+asinh -max
atan 0
atan -0
@@ -547,24 +547,24 @@ atanh 0x1p-600
atanh -0x1p-600
atanh 0x1p-10000
atanh -0x1p-10000
-atanh 0x0.ffffffp0 no-test-inline
-atanh -0x0.ffffffp0 no-test-inline
-atanh 0x0.ffffffff8p0 no-test-inline
-atanh -0x0.ffffffff8p0 no-test-inline
-atanh 0x0.ffffffffffffp0 no-test-inline
-atanh -0x0.ffffffffffffp0 no-test-inline
-atanh 0x0.fffffffffffff8p0 no-test-inline
-atanh -0x0.fffffffffffff8p0 no-test-inline
-atanh 0x0.ffffffffffffffffp0 no-test-inline
-atanh -0x0.ffffffffffffffffp0 no-test-inline
-atanh 0x0.ffffffffffffffffffffffffffcp0 no-test-inline
-atanh -0x0.ffffffffffffffffffffffffffcp0 no-test-inline
-atanh 0x0.ffffffffffffffffffffffffffff8p0 no-test-inline
-atanh -0x0.ffffffffffffffffffffffffffff8p0 no-test-inline
+atanh 0x0.ffffffp0
+atanh -0x0.ffffffp0
+atanh 0x0.ffffffff8p0
+atanh -0x0.ffffffff8p0
+atanh 0x0.ffffffffffffp0
+atanh -0x0.ffffffffffffp0
+atanh 0x0.fffffffffffff8p0
+atanh -0x0.fffffffffffff8p0
+atanh 0x0.ffffffffffffffffp0
+atanh -0x0.ffffffffffffffffp0
+atanh 0x0.ffffffffffffffffffffffffffcp0
+atanh -0x0.ffffffffffffffffffffffffffcp0
+atanh 0x0.ffffffffffffffffffffffffffff8p0
+atanh -0x0.ffffffffffffffffffffffffffff8p0
atanh -0x6.e6c77p-20
atanh 0x3.2ca824p-4
atanh -0x1.cc1d66p-4
-atanh -0xf.cd3809ca8fd28p-4 no-test-inline
+atanh -0xf.cd3809ca8fd28p-4
atanh -0x1.04f386p-4
atanh -0x2.084568p-4
atanh -0x3.e0a5d8p-4
@@ -4451,8 +4451,8 @@ cosh 0x2.f5d128p+0
cosh -0xd.0c03p+0
cosh -0x3.d04328728b72cp-4
cosh 0x1.629188p+4
-cosh max no-test-inline
-cosh -max no-test-inline
+cosh max
+cosh -max
cosh min
cosh -min
cosh min_subnorm
@@ -4474,14 +4474,14 @@ cosh 0x2.c679d1f73f0fb624d358b213a7p+8 xfail-rounding:ibm128-libgcc
cosh 0x2.c679d1f73f0fb624d358b213a8p+8 xfail-rounding:ibm128-libgcc
cosh -0x2.c679d1f73f0fb624d358b213a7p+8 xfail-rounding:ibm128-libgcc
cosh -0x2.c679d1f73f0fb624d358b213a8p+8 xfail-rounding:ibm128-libgcc
-cosh 0x2.c5d37700c6bb03a4p+12 no-test-inline
-cosh 0x2.c5d37700c6bb03a8p+12 no-test-inline
-cosh -0x2.c5d37700c6bb03a4p+12 no-test-inline
-cosh -0x2.c5d37700c6bb03a8p+12 no-test-inline
-cosh 0x2.c5d37700c6bb03a6c24b6c9b494cp+12 no-test-inline
-cosh 0x2.c5d37700c6bb03a6c24b6c9b494ep+12 no-test-inline
-cosh -0x2.c5d37700c6bb03a6c24b6c9b494cp+12 no-test-inline
-cosh -0x2.c5d37700c6bb03a6c24b6c9b494ep+12 no-test-inline
+cosh 0x2.c5d37700c6bb03a4p+12
+cosh 0x2.c5d37700c6bb03a8p+12
+cosh -0x2.c5d37700c6bb03a4p+12
+cosh -0x2.c5d37700c6bb03a8p+12
+cosh 0x2.c5d37700c6bb03a6c24b6c9b494cp+12
+cosh 0x2.c5d37700c6bb03a6c24b6c9b494ep+12
+cosh -0x2.c5d37700c6bb03a6c24b6c9b494cp+12
+cosh -0x2.c5d37700c6bb03a6c24b6c9b494ep+12
cpow 1 0 0 0 ignore-zero-inf-sign
cpow 2 0 10 0 ignore-zero-inf-sign
@@ -5659,42 +5659,42 @@ hypot 0.75 1.25
hypot 1.0 0x1p-61
hypot 0x1p+0 0x1.fp-129
hypot 0x1.23456789abcdef0123456789ab8p-500 0x1.23456789abcdef0123456789ab8p-500
-hypot 0x3p125 0x4p125 no-test-inline:binary32
-hypot 0x1.234566p-126 0x1.234566p-126 no-test-inline:binary32
-hypot 0x3p1021 0x4p1021 no-test-inline:binary64
-hypot 0x1p+0 0x0.3ep-1022 no-test-inline:binary64
-hypot 0x3p16381 0x4p16381 no-test-inline
+hypot 0x3p125 0x4p125
+hypot 0x1.234566p-126 0x1.234566p-126
+hypot 0x3p1021 0x4p1021
+hypot 0x1p+0 0x0.3ep-1022
+hypot 0x3p16381 0x4p16381
hypot 0x1p-149 0x1p-149
hypot 0x1p-1074 0x1p-1074
-hypot 0x1p-16445 0x1p-16445 no-test-inline
-hypot 0x1p-16494 0x1p-16494 no-test-inline
+hypot 0x1p-16445 0x1p-16445
+hypot 0x1p-16494 0x1p-16494
hypot 0x0.fffffep-126 0x0.fp-127
hypot 0x0.fffffep-126 0x0.fp-130
hypot 0x0.fffffffffffffp-1022 0x0.fp-1023
hypot 0x0.fffffffffffffp-1022 0x0.fp-1026
-hypot 0x0.ffffffp-16382 0x0.fp-16383 no-test-inline
-hypot 0x0.ffffffp-16382 0x0.fp-16386 no-test-inline
-hypot 0 min no-test-inline
-hypot 0 min_subnorm no-test-inline
-hypot 0 -min no-test-inline
-hypot 0 -min_subnorm no-test-inline
-hypot min 0 no-test-inline
-hypot min_subnorm 0 no-test-inline
-hypot -min 0 no-test-inline
-hypot -min_subnorm 0 no-test-inline
-hypot min min no-test-inline
-hypot min_subnorm min_subnorm no-test-inline
-hypot min min_subnorm no-test-inline
+hypot 0x0.ffffffp-16382 0x0.fp-16383
+hypot 0x0.ffffffp-16382 0x0.fp-16386
+hypot 0 min
+hypot 0 min_subnorm
+hypot 0 -min
+hypot 0 -min_subnorm
+hypot min 0
+hypot min_subnorm 0
+hypot -min 0
+hypot -min_subnorm 0
+hypot min min
+hypot min_subnorm min_subnorm
+hypot min min_subnorm
hypot 0x1.fp127 0x1.fp127
hypot 0x1.fp1023 0x1.fp1023
-hypot 0x1.fp16383 0x1.fp16383 no-test-inline xfail-rounding:ibm128-libgcc
+hypot 0x1.fp16383 0x1.fp16383 xfail-rounding:ibm128-libgcc
hypot 0x1p-127 0x1p-149
hypot 0x1p-1023 0x1p-1074
hypot 0x1p-970 0x1p-1074
-hypot 0x1p-16383 0x1p-16445 no-test-inline
-hypot 0x1p-16384 0x1p-16446 no-test-inline
-hypot 0x1p-16383 0x1p-16494 no-test-inline
+hypot 0x1p-16383 0x1p-16445
+hypot 0x1p-16384 0x1p-16446
+hypot 0x1p-16383 0x1p-16494
hypot -0x1.fa7deap+0 0x1.a761bab383ac8p+0
@@ -7301,8 +7301,8 @@ sinh -0x1.3dda8ap+0
sinh -0x5.ee9218p-4
sinh -0x1.bcfc98p+0
sinh -0x6.9bbb6df7c5d08p-4
-sinh max no-test-inline
-sinh -max no-test-inline
+sinh max
+sinh -max
sinh min
sinh -min
sinh min_subnorm
@@ -7314,10 +7314,10 @@ sinh 0x2.c679d1f73f0fap+8
sinh 0x2.c679d1f73f0fcp+8
sinh 0x2.c679d1f73f0fb624d358b213a7p+8 xfail-rounding:ibm128-libgcc
sinh 0x2.c679d1f73f0fb624d358b213a8p+8 xfail-rounding:ibm128-libgcc
-sinh 0x2.c5d37700c6bb03a4p+12 no-test-inline
-sinh 0x2.c5d37700c6bb03a8p+12 no-test-inline
-sinh 0x2.c5d37700c6bb03a6c24b6c9b494cp+12 no-test-inline
-sinh 0x2.c5d37700c6bb03a6c24b6c9b494ep+12 no-test-inline
+sinh 0x2.c5d37700c6bb03a4p+12
+sinh 0x2.c5d37700c6bb03a8p+12
+sinh 0x2.c5d37700c6bb03a6c24b6c9b494cp+12
+sinh 0x2.c5d37700c6bb03a6c24b6c9b494ep+12
sub 0 0
sub 0 -0
diff --git a/math/auto-libm-test-out-acosh b/math/auto-libm-test-out-acosh
index 57cfaee1ff..f408be3df1 100644
--- a/math/auto-libm-test-out-acosh
+++ b/math/auto-libm-test-out-acosh
@@ -48,350 +48,350 @@ acosh 0x1.000002p0
= acosh tonearest ibm128 0x1.000002p+0 : 0x1.ffffffaaaaaad11110fa35a36ap-12 : inexact-ok
= acosh towardzero ibm128 0x1.000002p+0 : 0x1.ffffffaaaaaad11110fa35a3698p-12 : inexact-ok
= acosh upward ibm128 0x1.000002p+0 : 0x1.ffffffaaaaaad11110fa35a36ap-12 : inexact-ok
-acosh 0x1.0000000000001p0 no-test-inline
-= acosh downward binary32 0x1.000002p+0 : 0x1.fffffep-12 : no-test-inline inexact-ok
-= acosh tonearest binary32 0x1.000002p+0 : 0x2p-12 : no-test-inline inexact-ok
-= acosh towardzero binary32 0x1.000002p+0 : 0x1.fffffep-12 : no-test-inline inexact-ok
-= acosh upward binary32 0x1.000002p+0 : 0x2p-12 : no-test-inline inexact-ok
-= acosh downward binary64 0x1.000002p+0 : 0x1.ffffffaaaaaadp-12 : no-test-inline inexact-ok
-= acosh tonearest binary64 0x1.000002p+0 : 0x1.ffffffaaaaaadp-12 : no-test-inline inexact-ok
-= acosh towardzero binary64 0x1.000002p+0 : 0x1.ffffffaaaaaadp-12 : no-test-inline inexact-ok
-= acosh upward binary64 0x1.000002p+0 : 0x1.ffffffaaaaaaep-12 : no-test-inline inexact-ok
-= acosh downward intel96 0x1.000002p+0 : 0x1.ffffffaaaaaad11p-12 : no-test-inline inexact-ok
-= acosh tonearest intel96 0x1.000002p+0 : 0x1.ffffffaaaaaad112p-12 : no-test-inline inexact-ok
-= acosh towardzero intel96 0x1.000002p+0 : 0x1.ffffffaaaaaad11p-12 : no-test-inline inexact-ok
-= acosh upward intel96 0x1.000002p+0 : 0x1.ffffffaaaaaad112p-12 : no-test-inline inexact-ok
-= acosh downward m68k96 0x1.000002p+0 : 0x1.ffffffaaaaaad11p-12 : no-test-inline inexact-ok
-= acosh tonearest m68k96 0x1.000002p+0 : 0x1.ffffffaaaaaad112p-12 : no-test-inline inexact-ok
-= acosh towardzero m68k96 0x1.000002p+0 : 0x1.ffffffaaaaaad11p-12 : no-test-inline inexact-ok
-= acosh upward m68k96 0x1.000002p+0 : 0x1.ffffffaaaaaad112p-12 : no-test-inline inexact-ok
-= acosh downward binary128 0x1.000002p+0 : 0x1.ffffffaaaaaad11110fa35a369c3p-12 : no-test-inline inexact-ok
-= acosh tonearest binary128 0x1.000002p+0 : 0x1.ffffffaaaaaad11110fa35a369c4p-12 : no-test-inline inexact-ok
-= acosh towardzero binary128 0x1.000002p+0 : 0x1.ffffffaaaaaad11110fa35a369c3p-12 : no-test-inline inexact-ok
-= acosh upward binary128 0x1.000002p+0 : 0x1.ffffffaaaaaad11110fa35a369c4p-12 : no-test-inline inexact-ok
-= acosh downward ibm128 0x1.000002p+0 : 0x1.ffffffaaaaaad11110fa35a3698p-12 : no-test-inline inexact-ok
-= acosh tonearest ibm128 0x1.000002p+0 : 0x1.ffffffaaaaaad11110fa35a36ap-12 : no-test-inline inexact-ok