From 99ef2719fb3d703fe38c4113cd7f5adec516dd3a Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 28 Oct 2016 20:29:21 +0200 Subject: test: remove test suite The test suite is now a developed in a separate git repository. See here: http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng-test.git The test suite should be just like every other software compiled with the cross-toolchain. In the past strange problems where found when the test suite got build in the toolchain creation step. --- test/math/Makefile | 8 - test/math/Makefile.in | 46 - test/math/basic-test.c | 161 - test/math/c99_test.c | 116 - test/math/compile_test.c | 141 - test/math/fenv.h | 3 - test/math/gamma.c | 73 - test/math/gen-libm-test.pl | 737 --- test/math/ilogb.c | 52 - test/math/libm-test-ulps-arc | 145 - test/math/libm-test-ulps-arm | 4989 ------------------ test/math/libm-test-ulps-cris | 145 - test/math/libm-test-ulps-generic | 5 - test/math/libm-test-ulps-i386 | 1261 ----- test/math/libm-test-ulps-ia64 | 1146 ----- test/math/libm-test-ulps-microblaze | 145 - test/math/libm-test-ulps-mips32 | 145 - test/math/libm-test-ulps-mips64 | 9633 ----------------------------------- test/math/libm-test-ulps-nds32 | 145 - test/math/libm-test-ulps-powerpc | 1336 ----- test/math/libm-test-ulps-sh | 1094 ---- test/math/libm-test-ulps-sparc | 1338 ----- test/math/libm-test-ulps-x86_64 | 1328 ----- test/math/libm-test-ulps-xtensa | 145 - test/math/libm-test.inc | 5096 ------------------ test/math/rint.c | 33 - test/math/signgam.c | 28 - test/math/test-double.c | 33 - test/math/test-float.c | 33 - test/math/test-fpucw.c | 42 - test/math/test-idouble.c | 34 - test/math/test-ifloat.c | 34 - test/math/test-ildoubl.c | 34 - test/math/test-ldouble.c | 33 - test/math/tst-definitions.c | 46 - 35 files changed, 29783 deletions(-) delete mode 100644 test/math/Makefile delete mode 100644 test/math/Makefile.in delete mode 100644 test/math/basic-test.c delete mode 100644 test/math/c99_test.c delete mode 100644 test/math/compile_test.c delete mode 100644 test/math/fenv.h delete mode 100644 test/math/gamma.c delete mode 100755 test/math/gen-libm-test.pl delete mode 100644 test/math/ilogb.c delete mode 100644 test/math/libm-test-ulps-arc delete mode 100644 test/math/libm-test-ulps-arm delete mode 100644 test/math/libm-test-ulps-cris delete mode 100644 test/math/libm-test-ulps-generic delete mode 100644 test/math/libm-test-ulps-i386 delete mode 100644 test/math/libm-test-ulps-ia64 delete mode 100644 test/math/libm-test-ulps-microblaze delete mode 100644 test/math/libm-test-ulps-mips32 delete mode 100644 test/math/libm-test-ulps-mips64 delete mode 100644 test/math/libm-test-ulps-nds32 delete mode 100644 test/math/libm-test-ulps-powerpc delete mode 100644 test/math/libm-test-ulps-sh delete mode 100644 test/math/libm-test-ulps-sparc delete mode 100644 test/math/libm-test-ulps-x86_64 delete mode 100644 test/math/libm-test-ulps-xtensa delete mode 100644 test/math/libm-test.inc delete mode 100644 test/math/rint.c delete mode 100644 test/math/signgam.c delete mode 100644 test/math/test-double.c delete mode 100644 test/math/test-float.c delete mode 100644 test/math/test-fpucw.c delete mode 100644 test/math/test-idouble.c delete mode 100644 test/math/test-ifloat.c delete mode 100644 test/math/test-ildoubl.c delete mode 100644 test/math/test-ldouble.c delete mode 100644 test/math/tst-definitions.c (limited to 'test/math') diff --git a/test/math/Makefile b/test/math/Makefile deleted file mode 100644 index 6194efa07..000000000 --- a/test/math/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# uClibc math tests -# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. - -top_builddir=../../ -top_srcdir=../../ -include ../Rules.mak --include Makefile.in -include ../Test.mak diff --git a/test/math/Makefile.in b/test/math/Makefile.in deleted file mode 100644 index 387400151..000000000 --- a/test/math/Makefile.in +++ /dev/null @@ -1,46 +0,0 @@ -# uClibc math tests -# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. - -# libm-test.c is a generated file used by the tests internally so skip it -TESTS_DISABLED := libm-test - -# gamma (removed from TESTS, need to add "small errors are ok" machinery there) -TESTS_DISABLED += gamma -ifeq ($(UCLIBC_HAS_LONG_DOUBLE_MATH),) -TESTS_DISABLED += test-ldouble test-ildoubl compile_test c99_test -CFLAGS_basic-test := -DNO_LONG_DOUBLE -endif -ifeq ($(DO_C99_MATH),) -TESTS_DISABLED += test-float test-ifloat test-double test-idouble rint signgam ilogb -endif -ifeq ($(UCLIBC_HAS_FPU),) -TESTS_DISABLED += test-fpucw -endif - -DODIFF_rint := 1 -DODIFF_signgam := 1 - -# NOTE: For basic-test we must disable the floating point optimization. -# Only for sh architecture because in the other architecture are disabled. -ifeq ($(TARGET_ARCH),sh) -CFLAGS_basic-test += -mieee -endif -EXTRA_CFLAGS := -fno-builtin -EXTRA_LDFLAGS := -lm - -PERL := perl - -MDEPS := $(wildcard test-*.c) -$(MDEPS): libm-test.c - -ULP_SUFFIX := -ifeq ($(TARGET_ARCH),mips) -ULP_SUFFIX:=$(if $(CONFIG_MIPS_N64_ABI),64,32) -endif - -TARGET_ULP := $(if $(wildcard libm-test-ulps-$(TARGET_ARCH)$(ULP_SUFFIX)),$(TARGET_ARCH)$(ULP_SUFFIX),generic) - -libm-test.c: libm-test-ulps-$(TARGET_ULP) libm-test.inc gen-libm-test.pl - $(Q)$(PERL) ./gen-libm-test.pl -u libm-test-ulps-$(TARGET_ULP) ./libm-test.inc -o "." 2>&1 > /dev/null - -EXTRA_CLEAN := libm-test.c libm-test-ulps.h diff --git a/test/math/basic-test.c b/test/math/basic-test.c deleted file mode 100644 index d073abb0f..000000000 --- a/test/math/basic-test.c +++ /dev/null @@ -1,161 +0,0 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Jaeger , 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 - 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 - . */ - -#define _ISOC99_SOURCE - -#include -#include -#include - -static int errors = 0; - - -static void -check (const char *testname, int result) -{ - if (!result) { - printf ("Failure: %s\n", testname); - errors++; - } -} - -#define TEST_FUNC(NAME, FLOAT, NANFUNC, EPSILON, HUGEVAL) \ -static void \ -NAME (void) \ -{ \ - /* Variables are declared volatile to forbid some compiler \ - optimizations. */ \ - volatile FLOAT Inf_var, NaN_var, zero_var, one_var; \ - FLOAT x1, x2; \ - \ - zero_var = 0.0; \ - one_var = 1.0; \ - NaN_var = zero_var/zero_var; \ - Inf_var = one_var / zero_var; \ - \ - (void) &zero_var; \ - (void) &one_var; \ - (void) &NaN_var; \ - (void) &Inf_var; \ - \ - \ - check (#FLOAT " isinf (inf) == 1", isinf (Inf_var) == 1); \ - check (#FLOAT " isinf (-inf) == -1", isinf (-Inf_var) == -1); \ - check (#FLOAT " !isinf (1)", !(isinf (one_var))); \ - check (#FLOAT " !isinf (NaN)", !(isinf (NaN_var))); \ - \ - check (#FLOAT " isnan (NaN)", isnan (NaN_var)); \ - check (#FLOAT " isnan (-NaN)", isnan (-NaN_var)); \ - check (#FLOAT " !isnan (1)", !(isnan (one_var))); \ - check (#FLOAT " !isnan (inf)", !(isnan (Inf_var))); \ - \ - /* \ - the same tests but this time with NAN from \ - NAN is a double const \ - */ \ - check (#FLOAT " isnan (NAN)", isnan (NAN)); \ - check (#FLOAT " isnan (-NAN)", isnan (-NAN)); \ - check (#FLOAT " !isinf (NAN)", !(isinf (NAN))); \ - check (#FLOAT " !isinf (-NAN)", !(isinf (-NAN))); \ - \ - /* \ - And again with the value returned by the `nan' function. \ - */ \ - check (#FLOAT " isnan (NAN)", isnan (NANFUNC (""))); \ - check (#FLOAT " isnan (-NAN)", isnan (-NANFUNC (""))); \ - check (#FLOAT " !isinf (NAN)", !(isinf (NANFUNC ("")))); \ - check (#FLOAT " !isinf (-NAN)", !(isinf (-NANFUNC ("")))); \ - check (#FLOAT " NAN != NAN", NANFUNC ("") != NANFUNC ("")); \ - \ - /* test if HUGE_VALx is ok */ \ - x1 = HUGEVAL; \ - check (#FLOAT " isinf (HUGE_VALx) == +1", isinf (x1) == +1); \ - x1 = - HUGEVAL; \ - check (#FLOAT " isinf (-HUGE_VALx) == -1", isinf (x1) == -1); \ -} -#ifndef DO_C99_MATH -# undef TEST_FUNC -# define TEST_FUNC(NAME, FLOAT, NANFUNC, EPSILON, HUGEVAL) \ -static void \ -NAME(void) \ -{ /* nothing */ } -#endif - -#define TEST_VAL(NAME, FLOAT, NANFUNC, EPSILON, HUGEVAL) \ -static void \ -NAME (void) \ -{ \ - /* Variables are declared volatile to forbid some compiler \ - optimizations. */ \ - volatile FLOAT Inf_var, NaN_var, zero_var, one_var; \ - FLOAT x1, x2; \ - \ - zero_var = 0.0; \ - one_var = 1.0; \ - NaN_var = zero_var/zero_var; \ - Inf_var = one_var / zero_var; \ - \ - (void) &zero_var; \ - (void) &one_var; \ - (void) &NaN_var; \ - (void) &Inf_var; \ - \ - \ - check (#FLOAT " inf == inf", Inf_var == Inf_var); \ - check (#FLOAT " -inf == -inf", -Inf_var == -Inf_var); \ - check (#FLOAT " inf != -inf", Inf_var != -Inf_var); \ - check (#FLOAT " NaN != NaN", NaN_var != NaN_var); \ - \ - check (#FLOAT " NAN != NAN", NAN != NAN); \ - \ - \ - /* test if EPSILON is ok */ \ - x1 = 1.0; \ - x2 = x1 + EPSILON; \ - check (#FLOAT " 1 != 1+EPSILON", x1 != x2); \ - \ - x1 = 1.0; \ - x2 = x1 - EPSILON; \ - check (#FLOAT " 1 != 1-EPSILON", x1 != x2); \ - \ -} - -TEST_VAL (float_test_value, float, nanf, FLT_EPSILON, HUGE_VALF) -TEST_FUNC (float_test_call, float, nanf, FLT_EPSILON, HUGE_VALF) -TEST_VAL (double_test_value, double, nan, DBL_EPSILON, HUGE_VAL) -TEST_FUNC (double_test_call, double, nan, DBL_EPSILON, HUGE_VAL) -#ifndef NO_LONG_DOUBLE -TEST_VAL (ldouble_test_value, long double, nanl, LDBL_EPSILON, HUGE_VALL) -TEST_FUNC (ldouble_test_call, long double, nanl, LDBL_EPSILON, HUGE_VALL) -#endif - -int -main (void) -{ - float_test_value (); - float_test_call (); - double_test_value (); - double_test_call (); - -#ifndef NO_LONG_DOUBLE - ldouble_test_value (); - ldouble_test_call (); -#endif - - return errors != 0; -} diff --git a/test/math/c99_test.c b/test/math/c99_test.c deleted file mode 100644 index 73382e41b..000000000 --- a/test/math/c99_test.c +++ /dev/null @@ -1,116 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#define check_d1(func, param, expected) \ -do { \ - int err; hex_union ur; hex_union up; \ - double result = func(param); up.f = param; ur.f = result; \ - errors += (err = (result != (expected))); \ - err \ - ? printf("FAIL: %s(%g/"HEXFMT")=%g/"HEXFMT" (expected %g)\n", \ - #func, (double)(param), (long long)up.hex, result, (long long)ur.hex, (double)(expected)) \ - : printf("PASS: %s(%g)=%g\n", #func, (double)(param), result); \ -} while (0) - -#define check_i1(func, param, expected) \ -do { \ - int err; hex_union up; \ - long long result = func(param); up.f = param; \ - errors += (err = (result != (expected))); \ - err \ - ? printf("FAIL: %s(%g/"HEXFMT")=%lld/%llu (expected %llu)\n", \ - #func, (double)(param), (long long)up.hex, result, result, (long long)(expected)) \ - : printf("PASS: %s(%g)=%lld/%llu\n", #func, (double)(param), result, result); \ -} while (0) - -#define HEXFMT "%08llx" -typedef union { - double f; - uint64_t hex; -} hex_union; - -double zero = 0.0; -double minus_zero = 0.0; -double nan_value = 0.0; -int errors = 0; - -int main(void) -{ - nan_value /= nan_value; - minus_zero = copysign(zero, -1.0); - - check_i1(isfinite, 1.0, 1); - check_i1(isfinite, 2.0, 1); - check_i1(isfinite, 3.0, 1); - check_i1(isfinite, DBL_MAX, 1); - check_i1(isfinite, FLT_MAX, 1); - check_i1(isfinite, HUGE_VAL, 0); - check_i1(isfinite, HUGE_VALF, 0); - check_i1(isfinite, HUGE_VALL, 0); - check_i1(isfinite, nan_value, 0); - check_i1(isfinite, nan_value, 0); - check_i1(isfinite, nan_value, 0); - - check_i1(isnan, 1.0, 0); - check_i1(isnan, 2.0, 0); - check_i1(isnan, 3.0, 0); - check_i1(isnan, DBL_MAX, 0); - check_i1(isnan, FLT_MAX, 0); - check_i1(isnan, HUGE_VAL, 0); - check_i1(isnan, HUGE_VALF, 0); - check_i1(isnan, HUGE_VALL, 0); - check_i1(isnan, (float)HUGE_VALL, 0); - check_i1(isnan, nan_value, 1); - check_i1(isnan, nan_value, 1); - check_i1(isnan, nan_value, 1); - - check_i1(isinf, 1.0, 0); - check_i1(isinf, 2.0, 0); - check_i1(isinf, 3.0, 0); - check_i1(isinf, DBL_MAX, 0); - check_i1(isinf, FLT_MAX, 0); - check_i1(isinf, (float)DBL_MAX, 1); - check_i1(isinf, HUGE_VAL, 1); - check_i1(isinf, HUGE_VALF, 1); - check_i1(isinf, HUGE_VALL, 1); - check_i1(isinf, (float)HUGE_VALL, 1); - check_i1(isinf, nan_value, 0); - check_i1(isinf, nan_value, 0); - check_i1(isinf, nan_value, 0); - - check_i1(fpclassify, minus_zero, FP_ZERO); - check_i1(fpclassify, 0.0, FP_ZERO); - check_i1(fpclassify, 1.0, FP_NORMAL); - check_i1(fpclassify, 2.0, FP_NORMAL); - check_i1(fpclassify, 3.0, FP_NORMAL); - check_i1(fpclassify, DBL_MIN/1.01, FP_SUBNORMAL); - check_i1(fpclassify, DBL_MIN, FP_NORMAL); - check_i1(fpclassify, DBL_MAX, FP_NORMAL); - check_i1(fpclassify, FLT_MAX, FP_NORMAL); - check_i1(fpclassify, DBL_MAX, FP_NORMAL); - check_i1(fpclassify, DBL_MAX*1.01, FP_INFINITE); - check_i1(fpclassify, HUGE_VAL, FP_INFINITE); - check_i1(fpclassify, HUGE_VALF, FP_INFINITE); - check_i1(fpclassify, HUGE_VALL, FP_INFINITE); - check_i1(fpclassify, (float)HUGE_VALL, FP_INFINITE); - check_i1(fpclassify, nan_value, FP_NAN); - check_i1(fpclassify, nan_value, FP_NAN); - check_i1(fpclassify, nan_value, FP_NAN); - - check_i1(!!signbit, -1.0, 1); - check_i1(!!signbit, minus_zero, 1); - check_i1(!!signbit, 0.0, 0); - check_i1(!!signbit, HUGE_VAL, 0); - check_i1(!!signbit, HUGE_VALF, 0); - check_i1(!!signbit, HUGE_VALL, 0); - check_i1(!!signbit, -HUGE_VAL, 1); - check_i1(!!signbit, -HUGE_VALF, 1); - check_i1(!!signbit, -HUGE_VALL, 1); - - printf("Errors: %d\n", errors); - return errors; -} diff --git a/test/math/compile_test.c b/test/math/compile_test.c deleted file mode 100644 index aedfde601..000000000 --- a/test/math/compile_test.c +++ /dev/null @@ -1,141 +0,0 @@ -#include - -static int testf(float float_x, long double long_double_x, /*float complex float_complex_x,*/ int int_x, long long_x) -{ -int r = 0; -r += acosf(float_x); -r += acoshf(float_x); -r += asinf(float_x); -r += asinhf(float_x); -r += atan2f(float_x, float_x); -r += atanf(float_x); -r += atanhf(float_x); -/*r += cargf(float_complex_x); - will fight with complex numbers later */ -r += cbrtf(float_x); -r += ceilf(float_x); -r += copysignf(float_x, float_x); -r += cosf(float_x); -r += coshf(float_x); -r += erfcf(float_x); -r += erff(float_x); -r += exp2f(float_x); -r += expf(float_x); -r += expm1f(float_x); -r += fabsf(float_x); -r += fdimf(float_x, float_x); -r += floorf(float_x); -r += fmaf(float_x, float_x, float_x); -r += fmaxf(float_x, float_x); -r += fminf(float_x, float_x); -r += fmodf(float_x, float_x); -r += frexpf(float_x, &int_x); -r += gammaf(float_x); -r += hypotf(float_x, float_x); -r += ilogbf(float_x); -r += ldexpf(float_x, int_x); -r += lgammaf(float_x); -r += llrintf(float_x); -r += llroundf(float_x); -r += log10f(float_x); -r += log1pf(float_x); -r += log2f(float_x); -r += logbf(float_x); -r += logf(float_x); -r += lrintf(float_x); -r += lroundf(float_x); -r += modff(float_x, &float_x); -r += nearbyintf(float_x); -r += nexttowardf(float_x, long_double_x); -r += powf(float_x, float_x); -r += remainderf(float_x, float_x); -r += remquof(float_x, float_x, &int_x); -r += rintf(float_x); -r += roundf(float_x); -#ifdef __UCLIBC_SUSV3_LEGACY__ -r += scalbf(float_x, float_x); -#endif -r += scalblnf(float_x, long_x); -r += scalbnf(float_x, int_x); -r += significandf(float_x); -r += sinf(float_x); -r += sinhf(float_x); -r += sqrtf(float_x); -r += tanf(float_x); -r += tanhf(float_x); -r += tgammaf(float_x); -r += truncf(float_x); -return r; -} - -static int testl(long double long_double_x, int int_x, long long_x) -{ -int r = 0; -r += __finitel(long_double_x); -r += __fpclassifyl(long_double_x); -r += __isinfl(long_double_x); -r += __isnanl(long_double_x); -r += __signbitl(long_double_x); -r += acoshl(long_double_x); -r += acosl(long_double_x); -r += asinhl(long_double_x); -r += asinl(long_double_x); -r += atan2l(long_double_x, long_double_x); -r += atanhl(long_double_x); -r += atanl(long_double_x); -r += cbrtl(long_double_x); -r += ceill(long_double_x); -r += copysignl(long_double_x, long_double_x); -r += coshl(long_double_x); -r += cosl(long_double_x); -r += erfcl(long_double_x); -r += erfl(long_double_x); -r += exp2l(long_double_x); -r += expl(long_double_x); -r += expm1l(long_double_x); -r += fabsl(long_double_x); -r += fdiml(long_double_x, long_double_x); -r += floorl(long_double_x); -r += fmal(long_double_x, long_double_x, long_double_x); -r += fmaxl(long_double_x, long_double_x); -r += fminl(long_double_x, long_double_x); -r += fmodl(long_double_x, long_double_x); -r += frexpl(long_double_x, &int_x); -r += hypotl(long_double_x, long_double_x); -r += ilogbl(long_double_x); -r += ldexpl(long_double_x, int_x); -r += lgammal(long_double_x); -r += llrintl(long_double_x); -r += llroundl(long_double_x); -r += log10l(long_double_x); -r += log1pl(long_double_x); -r += log2l(long_double_x); -r += logbl(long_double_x); -r += logl(long_double_x); -r += lrintl(long_double_x); -r += lroundl(long_double_x); -r += modfl(long_double_x, &long_double_x); -r += nearbyintl(long_double_x); -r += nextafterl(long_double_x, long_double_x); -r += nexttowardl(long_double_x, long_double_x); -r += powl(long_double_x, long_double_x); -r += remainderl(long_double_x, long_double_x); -r += remquol(long_double_x, long_double_x, &int_x); -r += rintl(long_double_x); -r += roundl(long_double_x); -r += scalblnl(long_double_x, long_x); -r += scalbnl(long_double_x, int_x); -r += sinhl(long_double_x); -r += sinl(long_double_x); -r += sqrtl(long_double_x); -r += tanhl(long_double_x); -r += tanl(long_double_x); -r += tgammal(long_double_x); -r += truncl(long_double_x); -return r; -} - -int main(int argc, char **argv) -{ - /* Always 0 but gcc hopefully won't be able to notice */ - return 5 & ((long)&testf) & ((long)&testl) & 2; -} diff --git a/test/math/fenv.h b/test/math/fenv.h deleted file mode 100644 index 0025a62cc..000000000 --- a/test/math/fenv.h +++ /dev/null @@ -1,3 +0,0 @@ -/* until we support fenv ... */ -#define feclearexcept(X) -#define fetestexcept(X) (0) diff --git a/test/math/gamma.c b/test/math/gamma.c deleted file mode 100644 index 69c10afa4..000000000 --- a/test/math/gamma.c +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include -#include -#include -#include - -#define check_d1(func, param, expected) \ -do { \ - int err; hex_union ur; hex_union up; \ - double result = func(param); up.f = param; ur.f = result; \ - errors += (err = (result != (expected))); \ - err \ - ? printf("FAIL: %s(%g/"HEXFMT")=%g/"HEXFMT" (expected %g)\n", \ - #func, (double)(param), (long long)up.hex, result, (long long)ur.hex, (double)(expected)) \ - : printf("PASS: %s(%g)=%g\n", #func, (double)(param), result); \ -} while (0) - -#define HEXFMT "%08llx" -typedef union { - double f; - uint64_t hex; -} hex_union; -double result; - -#define M_2_SQRT_PIl 3.5449077018110320545963349666822903L /* 2 sqrt (M_PIl) */ -#define M_SQRT_PIl 1.7724538509055160272981674833411451L /* sqrt (M_PIl) */ - -double zero = 0.0; -double minus_zero = 0.0; -double nan_value = 0.0; -int errors = 0; - -int main(void) -{ - nan_value /= nan_value; - minus_zero = copysign(zero, -1.0); - - //check_d1(tgamma, HUGE_VAL, NAN); - //check_d1(tgamma, negative_integer, NAN); - check_d1(tgamma, 0.0, HUGE_VAL); /* pole */ - check_d1(tgamma, minus_zero, -HUGE_VAL); /* pole */ - check_d1(tgamma, DBL_MAX/2, HUGE_VAL); /* overflow to inf */ - check_d1(tgamma, DBL_MAX, HUGE_VAL); /* overflow to inf */ - check_d1(tgamma, HUGE_VAL, HUGE_VAL); /* overflow to inf */ - check_d1(tgamma, 7, 2*3*4*5*6); /* normal value */ - check_d1(tgamma, -0.5, -M_2_SQRT_PIl); /* normal value (testing negative points) */ - - check_d1(lgamma, -HUGE_VAL, HUGE_VAL); - //check_d1(lgamma, HUGE_VAL, NAN); - check_d1(lgamma, 0.0, HUGE_VAL); /* pole */ - check_d1(lgamma, minus_zero, HUGE_VAL); /* pole */ - check_d1(lgamma, 1.0, 0.0); - check_d1(lgamma, 2.0, 0.0); - check_d1(lgamma, DBL_MAX/2, HUGE_VAL); /* overflow to inf */ - check_d1(lgamma, DBL_MAX, HUGE_VAL); /* overflow to inf */ - check_d1(lgamma, HUGE_VAL, HUGE_VAL); /* overflow to inf */ - check_d1(lgamma, 7, log(2*3*4*5*6)); /* normal value */ - - /* In glibc, gamma == lgamma. (In BSD, it's == tgamma */ - check_d1(gamma, -HUGE_VAL, HUGE_VAL); - //check_d1(gamma, HUGE_VAL, NAN); - check_d1(gamma, 0.0, HUGE_VAL); /* pole */ - check_d1(gamma, minus_zero, HUGE_VAL); /* pole */ - check_d1(gamma, 1.0, 0.0); - check_d1(gamma, 2.0, 0.0); - check_d1(gamma, DBL_MAX/2, HUGE_VAL); /* overflow to inf */ - check_d1(gamma, DBL_MAX, HUGE_VAL); /* overflow to inf */ - check_d1(gamma, HUGE_VAL, HUGE_VAL); /* overflow to inf */ - check_d1(gamma, 7, log(2*3*4*5*6)); /* normal value */ - - printf("Errors: %d\n", errors); - return errors; -} diff --git a/test/math/gen-libm-test.pl b/test/math/gen-libm-test.pl deleted file mode 100755 index 118f352fa..000000000 --- a/test/math/gen-libm-test.pl +++ /dev/null @@ -1,737 +0,0 @@ -#!/usr/bin/env perl -# Copyright (C) 1999 Free Software Foundation, Inc. -# This file is part of the GNU C Library. -# Contributed by Andreas Jaeger , 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 -# 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; see the file COPYING.LIB. If -# not, see . - -# This file needs to be tidied up -# Note that functions and tests share the same namespace. - -# Information about tests are stored in: %results -# $results{$test}{"kind"} is either "fct" or "test" and flags whether this -# is a maximal error of a function or a single test. -# $results{$test}{"type"} is the result type, e.g. normal or complex. -# $results{$test}{"has_ulps"} is set if deltas exist. -# $results{$test}{"has_fails"} is set if exptected failures exist. -# In the following description $type and $float are: -# - $type is either "normal", "real" (for the real part of a complex number) -# or "imag" (for the imaginary part # of a complex number). -# - $float is either of float, ifloat, double, idouble, ldouble, ildouble; -# It represents the underlying floating point type (float, double or long -# double) and if inline functions (the leading i stands for inline) -# are used. -# $results{$test}{$type}{"fail"}{$float} is defined and has a 1 if -# the test is expected to fail -# $results{$test}{$type}{"ulp"}{$float} is defined and has a delta as value - - -use Getopt::Std; - -use strict; - -use vars qw ($input $output); -use vars qw (%results); -use vars qw (@tests @functions); -use vars qw ($count); -use vars qw (%beautify @all_floats); -use vars qw ($output_dir $ulps_file); - -# all_floats is sorted and contains all recognised float types -@all_floats = ('double', 'float', 'idouble', - 'ifloat', 'ildouble', 'ldouble'); - -%beautify = - ( "minus_zero" => "-0", - "plus_zero" => "+0", - "minus_infty" => "-inf", - "plus_infty" => "inf", - "nan_value" => "NaN", - "M_El" => "e", - "M_E2l" => "e^2", - "M_E3l" => "e^3", - "M_LOG10El", "log10(e)", - "M_PIl" => "pi", - "M_PI_34l" => "3/4 pi", - "M_PI_2l" => "pi/2", - "M_PI_4l" => "pi/4", - "M_PI_6l" => "pi/6", - "M_PI_34_LOG10El" => "3/4 pi*log10(e)", - "M_PI_LOG10El" => "pi*log10(e)", - "M_PI2_LOG10El" => "pi/2*log10(e)", - "M_PI4_LOG10El" => "pi/4*log10(e)", - "M_LOG_SQRT_PIl" => "log(sqrt(pi))", - "M_LOG_2_SQRT_PIl" => "log(2*sqrt(pi))", - "M_2_SQRT_PIl" => "2 sqrt (pi)", - "M_SQRT_PIl" => "sqrt (pi)", - "INVALID_EXCEPTION" => "invalid exception", - "DIVIDE_BY_ZERO_EXCEPTION" => "division by zero exception", - "INVALID_EXCEPTION_OK" => "invalid exception allowed", - "DIVIDE_BY_ZERO_EXCEPTION_OK" => "division by zero exception allowed", - "EXCEPTIONS_OK" => "exceptions allowed", - "IGNORE_ZERO_INF_SIGN" => "sign of zero/inf not specified", -"INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN" => "invalid exception and sign of zero/inf not specified" - ); - - -# get Options -# Options: -# u: ulps-file -# h: help -# o: output-directory -# n: generate new ulps file -use vars qw($opt_u $opt_h $opt_o $opt_n); -getopts('u:o:nh'); - -$ulps_file = 'libm-test-ulps'; -$output_dir = ''; - -if ($opt_h) { - print "Usage: gen-libm-test.pl [OPTIONS]\n"; - print " -h print this help, then exit\n"; - print " -o DIR directory where generated files will be placed\n"; - print " -n only generate sorted file NewUlps from libm-test-ulps\n"; - print " -u FILE input file with ulps\n"; - exit 0; -} - -$ulps_file = $opt_u if ($opt_u); -$output_dir = $opt_o if ($opt_o); - -$input = "libm-test.inc"; -$output = "${output_dir}libm-test.c"; - -$count = 0; - -&parse_ulps ($ulps_file); -&generate_testfile ($input, $output) unless ($opt_n); -&output_ulps ("${output_dir}libm-test-ulps.h", $ulps_file) unless ($opt_n); -&print_ulps_file ("${output_dir}NewUlps") if ($opt_n); - -# Return a nicer representation -sub beautify { - my ($arg) = @_; - my ($tmp); - - if (exists $beautify{$arg}) { - return $beautify{$arg}; - } - if ($arg =~ /^-/) { - $tmp = $arg; - $tmp =~ s/^-//; - if (exists $beautify{$tmp}) { - return '-' . $beautify{$tmp}; - } - } - if ($arg =~ /[0-9]L$/) { - $arg =~ s/L$//; - } - return $arg; -} - -# Return a nicer representation of a complex number -sub build_complex_beautify { - my ($r, $i) = @_; - my ($str1, $str2); - - $str1 = &beautify ($r); - $str2 = &beautify ($i); - if ($str2 =~ /^-/) { - $str2 =~ s/^-//; - $str1 .= ' - ' . $str2; - } else { - $str1 .= ' + ' . $str2; - } - $str1 .= ' i'; - return $str1; -} - -# Return name of a variable -sub get_variable { - my ($number) = @_; - - return "x" if ($number == 1); - return "y" if ($number == 2); - return "z" if ($number == 3); - # return x1,x2,... - $number =-3; - return "x$number"; -} - -# Add a new test to internal data structures and fill in the -# ulps, failures and exception information for the C line. -sub new_test { - my ($test, $exception) = @_; - my $rest; - - # Add ulp, xfail - if (exists $results{$test}{'has_ulps'}) { - $rest = ", DELTA$count"; - } else { - $rest = ', 0'; - } - if (exists $results{$test}{'has_fails'}) { - $rest .= ", FAIL$count"; - } else { - $rest .= ', 0'; - } - if (defined $exception) { - $rest .= ", $exception"; - } else { - $rest .= ', 0'; - } - $rest .= ");\n"; - # We must increment here to keep @tests and count in sync - push @tests, $test; - ++$count; - return $rest; -} - -# Treat some functions especially. -# Currently only sincos needs extra treatment. -sub special_functions { - my ($file, $args) = @_; - my (@args, $str, $test, $cline); - - @args = split /,\s*/, $args; - - unless ($args[0] =~ /sincos/) { - die ("Don't know how to handle $args[0] extra."); - } - print $file " FUNC (sincos) ($args[1], &sin_res, &cos_res);\n"; - - $str = 'sincos (' . &beautify ($args[1]) . ', &sin_res, &cos_res)'; - # handle sin - $test = $str . ' puts ' . &beautify ($args[2]) . ' in sin_res'; - if ($#args == 4) { - $test .= " plus " . &beautify ($args[4]); - } - - $cline = " check_float (\"$test\", sin_res, $args[2]"; - $cline .= &new_test ($test, $args[4]); - print $file $cline; - - # handle cos - $test = $str . ' puts ' . &beautify ($args[3]) . ' in cos_res'; - $cline = " check_float (\"$test\", cos_res, $args[3]"; - # only tests once for exception - $cline .= &new_test ($test, undef); - print $file $cline; -} - -# Parse the arguments to TEST_x_y -sub parse_args { - my ($file, $descr, $args) = @_; - my (@args, $str, $descr_args, $descr_res, @descr); - my ($current_arg, $cline, $i); - my ($pre, $post, @special); - my ($extra_var, $call, $c_call); - - if ($descr eq 'extra') { - &special_functions ($file, $args); - return; - } - ($descr_args, $descr_res) = split /_/,$descr, 2; - - @args = split /,\s*/, $args; - - $call = "$args[0] ("; - - # Generate first the string that's shown to the user - $current_arg = 1; - $extra_var = 0; - @descr = split //,$descr_args; - for ($i = 0; $i <= $#descr; $i++) { - if ($i >= 1) { - $call .= ', '; - } - # FLOAT, int, long int, long long int - if ($descr[$i] =~ /f|i|l|L/) { - $call .= &beautify ($args[$current_arg]); - ++$current_arg; - next; - } - # &FLOAT, &int - argument is added here - if ($descr[$i] =~ /F|I/) { - ++$extra_var; - $call .= '&' . &get_variable ($extra_var); - next; - } - # complex - if ($descr[$i] eq 'c') { - $call .= &build_complex_beautify ($args[$current_arg], $args[$current_arg+1]); - $current_arg += 2; - next; - } - - die ("$descr[$i] is unknown"); - } - $call .= ')'; - $str = "$call == "; - - # Result - @descr = split //,$descr_res; - foreach (@descr) { - if ($_ =~ /f|i|l|L/) { - $str .= &beautify ($args[$current_arg]); - ++$current_arg; - } elsif ($_ eq 'c') { - $str .= &build_complex_beautify ($args[$current_arg], $args[$current_arg+1]); - $current_arg += 2; - } elsif ($_ eq 'b') { - # boolean - $str .= ($args[$current_arg] == 0) ? "false" : "true"; - ++$current_arg; - } elsif ($_ eq '1') { - ++$current_arg; - } else { - die ("$_ is unknown"); - } - } - # consistency check - if ($current_arg == $#args) { - die ("wrong number of arguments") - unless ($args[$current_arg] =~ /EXCEPTION|IGNORE_ZERO_INF_SIGN/); - } elsif ($current_arg < $#args) { - die ("wrong number of arguments"); - } elsif ($current_arg > ($#args+1)) { - die ("wrong number of arguments"); - } - - - # check for exceptions - if ($current_arg <= $#args) { - $str .= " plus " . &beautify ($args[$current_arg]); - } - - # Put the C program line together - # Reset some variables to start again - $current_arg = 1; - $extra_var = 0; - if (substr($descr_res,0,1) eq 'f') { - $cline = 'check_float' - } elsif (substr($descr_res,0,1) eq 'b') { - $cline = 'check_bool'; - } elsif (substr($descr_res,0,1) eq 'c') { - $cline = 'check_complex'; - } elsif (substr($descr_res,0,1) eq 'i') { - $cline = 'check_int'; - } elsif (substr($descr_res,0,1) eq 'l') { - $cline = 'check_long'; - } elsif (substr($descr_res,0,1) eq 'L') { - $cline = 'check_longlong'; - } - # Special handling for some macros: - $cline .= " (\"$str\", "; - if ($args[0] =~ /fpclassify|isnormal|isfinite|signbit/) { - $c_call = "$args[0] ("; - } else { - $c_call = " FUNC($args[0]) ("; - } - @descr = split //,$descr_args; - for ($i=0; $i <= $#descr; $i++) { - if ($i >= 1) { - $c_call .= ', '; - } - # FLOAT, int, long int, long long int - if ($descr[$i] =~ /f|i|l|L/) { - $c_call .= $args[$current_arg]; - $current_arg++; - next; - } - # &FLOAT, &int - if ($descr[$i] =~ /F|I/) { - ++$extra_var; - $c_call .= '&' . &get_variable ($extra_var); - next; - } - # complex - if ($descr[$i] eq 'c') { - $c_call .= "BUILD_COMPLEX ($args[$current_arg], $args[$current_arg+1])"; - $current_arg += 2; - next; - } - } - $c_call .= ')'; - $cline .= "$c_call, "; - - @descr = split //,$descr_res; - foreach (@descr) { - if ($_ =~ /b|f|i|l|L/ ) { - $cline .= $args[$current_arg]; - $current_arg++; - } elsif ($_ eq 'c') { - $cline .= "BUILD_COMPLEX ($args[$current_arg], $args[$current_arg+1])"; - $current_arg += 2; - } elsif ($_ eq '1') { - push @special, $args[$current_arg]; - ++$current_arg; - } - } - # Add ulp, xfail - $cline .= &new_test ($str, ($current_arg <= $#args) ? $args[$current_arg] : undef); - - # special treatment for some functions - if ($args[0] eq 'frexp') { - if (defined $special[0] && $special[0] ne "IGNORE") { - my ($str) = "$call sets x to $special[0]"; - $post = " check_int (\"$str\", x, $special[0]"; - $post .= &new_test ($str, undef); - } - } elsif ($args[0] eq 'gamma' || $args[0] eq 'lgamma') { - $pre = " signgam = 0;\n"; - if (defined $special[0] && $special[0] ne "IGNORE") { - my ($str) = "$call sets signgam to $special[0]"; - $post = " check_int (\"$str\", signgam, $special[0]"; - $post .= &new_test ($str, undef); - } - } elsif ($args[0] eq 'modf') { - if (defined $special[0] && $special[0] ne "IGNORE") { - my ($str) = "$call sets x to $special[0]"; - $post = " check_float (\"$str\", x, $special[0]"; - $post .= &new_test ($str, undef); - } - } elsif ($args[0] eq 'remquo') { - if (defined $special[0] && $special[0] ne "IGNORE") { - my ($str) = "$call sets x to $special[0]"; - $post = " check_int (\"$str\", x, $special[0]"; - $post .= &new_test ($str, undef); - } - } - - print $file $pre if (defined $pre); - - print $file " $cline"; - - print $file $post if (defined $post); -} - -# Generate libm-test.c -sub generate_testfile { - my ($input, $output) = @_; - my ($lasttext); - my (@args, $i, $str); - - open INPUT, $input or die ("Can't open $input: $!"); - open OUTPUT, ">$output" or die ("Can't open $output: $!"); - - # Replace the special macros - while () { - - # TEST_... - if (/^\s*TEST_/) { - my ($descr, $args); - chop; - ($descr, $args) = ($_ =~ /TEST_(\w+)\s*\((.*)\)/); - &parse_args (\*OUTPUT, $descr, $args); - next; - } - # START (function) - if (/START/) { - print OUTPUT " init_max_error ();\n"; - next; - } - # END (function) - if (/END/) { - my ($fct, $line, $type); - if (/complex/) { - s/,\s*complex\s*//; - $type = 'complex'; - } else { - $type = 'normal'; - } - ($fct) = ($_ =~ /END\s*\((.*)\)/); - if ($type eq 'complex') { - $line = " print_complex_max_error (\"$fct\", "; - } else { - $line = " print_max_error (\"$fct\", "; - } - if (exists $results{$fct}{'has_ulps'}) { - $line .= "DELTA$fct"; - } else { - $line .= '0'; - } - if (exists $results{$fct}{'has_fails'}) { - $line .= ", FAIL$fct"; - } else { - $line .= ', 0'; - } - $line .= ");\n"; - print OUTPUT $line; - push @functions, $fct; - next; - } - print OUTPUT; - } - close INPUT; - close OUTPUT; -} - - - -# Parse ulps file -sub parse_ulps { - my ($file) = @_; - my ($test, $type, $float, $eps, $kind); - - # $type has the following values: - # "normal": No complex variable - # "real": Real part of complex result - # "imag": Imaginary part of complex result - open ULP, $file or die ("Can't open $file: $!"); - while () { - chop; - # ignore comments and empty lines - next if /^#/; - next if /^\s*$/; - if (/^Test/) { - if (/Real part of:/) { - s/Real part of: //; - $type = 'real'; - } elsif (/Imaginary part of:/) { - s/Imaginary part of: //; - $type = 'imag'; - } else { - $type = 'normal'; - } - s/^.+\"(.*)\".*$/$1/; - $test = $_; - $kind = 'test'; - next; - } - if (/^Function: /) { - if (/Real part of/) { - s/Real part of //; - $type = 'real'; - } elsif (/Imaginary part of/) { - s/Imaginary part of //; - $type = 'imag'; - } else { - $type = 'normal'; - } - ($test) = ($_ =~ /^Function:\s*\"([a-zA-Z0-9_]+)\"/); - $kind = 'fct'; - next; - } - if (/^i?(float|double|ldouble):/) { - ($float, $eps) = split /\s*:\s*/,$_,2; - - if ($eps eq 'fail') { - $results{$test}{$type}{'fail'}{$float} = 1; - $results{$test}{'has_fails'} = 1; - } elsif ($eps eq "0") { - # ignore - next; - } else { - $results{$test}{$type}{'ulp'}{$float} = $eps; - $results{$test}{'has_ulps'} = 1; - } - if ($type =~ /^real|imag$/) { - $results{$test}{'type'} = 'complex'; - } elsif ($type eq 'normal') { - $results{$test}{'type'} = 'normal'; - } - $results{$test}{'kind'} = $kind; - next; - } - print "Skipping unknown entry: `$_'\n"; - } - close ULP; -} - - -# Clean up a floating point number -sub clean_up_number { - my ($number) = @_; - - # Remove trailing zeros - $number =~ s/0+$//; - $number =~ s/\.$//; - return $number; -} - -# Output a file which can be read in as ulps file. -sub print_ulps_file { - my ($file) = @_; - my ($test, $type, $float, $eps, $fct, $last_fct); - - $last_fct = ''; - open NEWULP, ">$file" or die ("Can't open $file: $!"); - print NEWULP "# Begin of automatic generation\n"; - # first the function calls - foreach $test (sort keys %results) { - next if ($results{$test}{'kind'} ne 'test'); - foreach $type ('real', 'imag', 'normal') { - if (exists $results{$test}{$type}) { - if (defined $results{$test}) { - ($fct) = ($test =~ /^(\w+)\s/); - if ($fct ne $last_fct) { - $last_fct = $fct; - print NEWULP "\n# $fct\n"; - } - } - if ($type eq 'normal') { - print NEWULP "Test \"$test\":\n"; - } elsif ($type eq 'real') { - print NEWULP "Test \"Real part of: $test\":\n"; - } elsif ($type eq 'imag') { - print NEWULP "Test \"Imaginary part of: $test\":\n"; - } - foreach $float (@all_floats) { - if (exists $results{$test}{$type}{'ulp'}{$float}) { - print NEWULP "$float: ", - &clean_up_number ($results{$test}{$type}{'ulp'}{$float}), - "\n"; - } - if (exists $results{$test}{$type}{'fail'}{$float}) { - print NEWULP "$float: fail\n"; - } - } - } - } - } - print NEWULP "\n# Maximal error of functions:\n"; - - foreach $fct (sort keys %results) { - next if ($results{$fct}{'kind'} ne 'fct'); - foreach $type ('real', 'imag', 'normal') { - if (exists $results{$fct}{$type}) { - if ($type eq 'normal') { - print NEWULP "Function: \"$fct\":\n"; - } elsif ($type eq 'real') { - print NEWULP "Function: Real part of \"$fct\":\n"; - } elsif ($type eq 'imag') { - print NEWULP "Function: Imaginary part of \"$fct\":\n"; - } - foreach $float (@all_floats) { - if (exists $results{$fct}{$type}{'ulp'}{$float}) { - print NEWULP "$float: ", - &clean_up_number ($results{$fct}{$type}{'ulp'}{$float}), - "\n"; - } - if (exists $results{$fct}{$type}{'fail'}{$float}) { - print NEWULP "$float: fail\n"; - } - } - print NEWULP "\n"; - } - } - } - print NEWULP "# end of automatic generation\n"; - close NEWULP; -} - -sub get_ulps { - my ($test, $type, $float) = @_; - - if ($type eq 'complex') { - my ($res); - # Return 0 instead of BUILD_COMPLEX (0,0) - if (!exists $results{$test}{'real'}{'ulp'}{$float} && - !exists $results{$test}{'imag'}{'ulp'}{$float}) { - return "0"; - } - $res = 'BUILD_COMPLEX ('; - $res .= (exists $results{$test}{'real'}{'ulp'}{$float} - ? $results{$test}{'real'}{'ulp'}{$float} : "0"); - $res .= ', '; - $res .= (exists $results{$test}{'imag'}{'ulp'}{$float} - ? $results{$test}{'imag'}{'ulp'}{$float} : "0"); - $res .= ')'; - return $res; - } - return (exists $results{$test}{'normal'}{'ulp'}{$float} - ? $results{$test}{'normal'}{'ulp'}{$float} : "0"); -} - -sub get_failure { - my ($test, $type, $float) = @_; - if ($type eq 'complex') { - # return x,y - my ($res); - # Return 0 instead of BUILD_COMPLEX_INT (0,0) - if (!exists $results{$test}{'real'}{'ulp'}{$float} && - !exists $results{$test}{'imag'}{'ulp'}{$float}) { - return "0"; - } - $res = 'BUILD_COMPLEX_INT ('; - $res .= (exists $results{$test}{'real'}{'fail'}{$float} - ? $results{$test}{'real'}{'fail'}{$float} : "0"); - $res .= ', '; - $res .= (exists $results{$test}{'imag'}{'fail'}{$float} - ? $results{$test}{'imag'}{'fail'}{$float} : "0"); - $res .= ')'; - return $res; - } - return (exists $results{$test}{'normal'}{'fail'}{$float} - ? $results{$test}{'normal'}{'fail'}{$float} : "0"); - -} - -# Output the defines for a single test -sub output_test { - my ($file, $test, $name) = @_; - my ($ldouble, $double, $float, $ildouble, $idouble, $ifloat); - my ($type); - - # Do we have ulps/failures? - if (!exists $results{$test}{'type'}) { - return; - } - $type = $results{$test}{'type'}; - if (exists $results{$test}{'has_ulps'}) { - # XXX use all_floats (change order!) - $ldouble = &get_ulps ($test, $type, "ldouble"); - $double = &get_ulps ($test, $type, "double"); - $float = &get_ulps ($test, $type, "float"); - $ildouble = &get_ulps ($test, $type, "ildouble"); - $idouble = &get_ulps ($test, $type, "idouble"); - $ifloat = &get_ulps ($test, $type, "ifloat"); - print $file "#define DELTA$name CHOOSE($ldouble, $double, $float, $ildouble, $idouble, $ifloat)\t/* $test */\n"; - } - - if (exists $results{$test}{'has_fails'}) { - $ldouble = &get_failure ($test, "ldouble"); - $double = &get_failure ($test, "double"); - $float = &get_failure ($test, "float"); - $ildouble = &get_failure ($test, "ildouble"); - $idouble = &get_failure ($test, "idouble"); - $ifloat = &get_failure ($test, "ifloat"); - print $file "#define FAIL$name CHOOSE($ldouble, $double, $float $ildouble, $idouble, $ifloat)\t/* $test */\n"; - } -} - -# Print include file -sub output_ulps { - my ($file, $ulps_filename) = @_; - my ($i, $fct); - - open ULP, ">$file" or die ("Can't open $file: $!"); - - print ULP "/* This file is automatically generated\n"; - print ULP " from $ulps_filename with gen-libm-test.pl.\n"; - print ULP " Don't change it - change instead the master files. */\n\n"; - - print ULP "\n/* Maximal error of functions. */\n"; - foreach $fct (@functions) { - output_test (\*ULP, $fct, $fct); - } - - print ULP "\n/* Error of single function calls. */\n"; - for ($i = 0; $i < $count; $i++) { - output_test (\*ULP, $tests[$i], $i); - } - close ULP; -} diff --git a/test/math/ilogb.c b/test/math/ilogb.c deleted file mode 100644 index 041e66b0e..000000000 --- a/test/math/ilogb.c +++ /dev/null @@ -1,52 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#define check_d1(func, param, expected) \ -do { \ - int err; hex_union ur; hex_union up; \ - double result = func(param); up.f = param; ur.f = result; \ - errors += (err = (result != (expected))); \ - err \ - ? printf("FAIL: %s(%g/"HEXFMT")=%g/"HEXFMT" (expected %g)\n", \ - #func, (double)(param), (long long)up.hex, result, (long long)ur.hex, (double)(expected)) \ - : printf("PASS: %s(%g)=%g\n", #func, (double)(param), result); \ -} while (0) - -#define check_i1(func, param, expected) \ -do { \ - int err; hex_union up; \ - long long result = func(param); up.f = param; \ - errors += (err = (result != (expected))); \ - err \ - ? printf("FAIL: %s(%g/"HEXFMT")=%lld/%llu (expected %llu)\n", \ - #func, (double)(param), (long long)up.hex, result, result, (long long)(expected)) \ - : printf("PASS: %s(%g)=%lld/%llu\n", #func, (double)(param), result, result); \ -} while (0) - -#define HEXFMT "%08llx" -typedef union { - double f; - uint64_t hex; -} hex_union; - -double nan_value = 0.0; -int errors = 0; - -int main(void) -{ - nan_value /= nan_value; - - check_i1(ilogb, 0.0, FP_ILOGB0); - check_i1(ilogb, HUGE_VAL, INT_MAX); - check_i1(ilogb, nan_value, FP_ILOGBNAN); - check_i1(ilogbf, 0.0, FP_ILOGB0); - check_i1(ilogbf, HUGE_VALF, INT_MAX); - check_i1(ilogbf, nan_value, FP_ILOGBNAN); - - printf("Errors: %d\n", errors); - return errors; -} diff --git a/test/math/libm-test-ulps-arc b/test/math/libm-test-ulps-arc deleted file mode 100644 index 46b2ac559..000000000 --- a/test/math/libm-test-ulps-arc +++ /dev/null @@ -1,145 +0,0 @@ -# Begin of automatic generation - -# cos -Test "cos (M_PI_6l * 2.0) == 0.5": -double: 1 -idouble: 1 -Test "cos (M_PI_6l * 4.0) == -0.5": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 - -# erf -Test "erf (0.75) == 0.711155633653515131598937834591410777": -double: 1 -idouble: 1 -Test "erf (1.25) == 0.922900128256458230136523481197281140": -double: 1 -idouble: 1 - -# erfc -Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8": -double: 1 -idouble: 1 - -# exp -Test "exp (1) == e": -double: 1 -idouble: 1 - -# expm1 -Test "expm1 (0.75) == 1.11700001661267466854536981983709561": -double: 1 -idouble: 1 - -# hypot -Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 -Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": -float: 1 -ifloat: 1 - -# lgamma -Test "lgamma (0.7) == 0.260867246531666514385732417016759578": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - -# log10 -Test "log10 (0.75) == -0.124938736608299953132449886193870744": -double: 1 -idouble: 1 -Test "log10 (e) == log10(e)": -float: 1 -ifloat: 1 - -# tgamma -Test "tgamma (-0.5) == -2 sqrt (pi)": -double: 1 -idouble: 1 -Test "tgamma (0.7) == 1.29805533264755778568117117915281162": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -# Maximal error of functions: -Function: "cos": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 - -Function: "erf": -double: 1 -idouble: 1 - -Function: "erfc": -double: 1 -idouble: 1 - -Function: "exp": -double: 1 -idouble: 1 - -Function: "expm1": -double: 1 -idouble: 1 - -Function: "hypot": -float: 1 -ifloat: 1 - -Function: "lgamma": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 - -Function: "log": -float: 1 -ifloat: 1 - -Function: "log10": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: "tan": -double: 1 -idouble: 1 - -Function: "tgamma": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -# end of automatic generation diff --git a/test/math/libm-test-ulps-arm b/test/math/libm-test-ulps-arm deleted file mode 100644 index 8528e81b4..000000000 --- a/test/math/libm-test-ulps-arm +++ /dev/null @@ -1,4989 +0,0 @@ -# Begin of automatic generation - -# acos_downward -Test "acos_downward (-0)": -float: 1 -ifloat: 1 -Test "acos_downward (-0.5)": -double: 1 -idouble: 1 -Test "acos_downward (-1)": -float: 1 -ifloat: 1 -Test "acos_downward (0)": -float: 1 -ifloat: 1 -Test "acos_downward (0.5)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -# acos_towardzero -Test "acos_towardzero (-0)": -float: 1 -ifloat: 1 -Test "acos_towardzero (-0.5)": -double: 1 -idouble: 1 -Test "acos_towardzero (-1)": -float: 1 -ifloat: 1 -Test "acos_towardzero (0)": -float: 1 -ifloat: 1 -Test "acos_towardzero (0.5)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -# asin_downward -Test "asin_downward (-0.5)": -double: 1 -idouble: 1 -Test "asin_downward (0.5)": -double: 1 -idouble: 1 -Test "asin_downward (1.0)": -float: 1 -ifloat: 1 - -# asin_towardzero -Test "asin_towardzero (-0.5)": -double: 1 -idouble: 1 -Test "asin_towardzero (-1.0)": -float: 1 -ifloat: 1 -Test "asin_towardzero (0.5)": -double: 1 -idouble: 1 -Test "asin_towardzero (1.0)": -float: 1 -ifloat: 1 - -# asin_upward -Test "asin_upward (-1.0)": -float: 1 -ifloat: 1 - -# atan2 -Test "atan2 (-0.75, -1.0)": -float: 1 -ifloat: 1 -Test "atan2 (-max_value, -min_value)": -float: 1 -ifloat: 1 -Test "atan2 (0.75, -1.0)": -float: 1 -ifloat: 1 -Test "atan2 (1.390625, 0.9296875)": -float: 1 -ifloat: 1 - -# atanh -Test "atanh (0.75)": -float: 1 -ifloat: 1 - -# cacos -Test "Imaginary part of: cacos (+0 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (+0 + 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cacos (+0 + 1.5 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (+0 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (+0 - 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cacos (+0 - 1.5 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0 + 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0 + 1.5 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0 - 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0 - 1.5 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (-0.25 + 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0.25 + 1.0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0.25 - 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0.25 - 1.0 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0.5 + 0x1.fp-129 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0.5 + 0x1p-105 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0.5 + 0x1p-112 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0.5 + 0x1p-23 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (-0.5 + 1.0 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0.5 + 1.0 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0.5 - 0x1.fp-129 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0.5 - 0x1p-105 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0.5 - 0x1p-112 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0.5 - 0x1p-23 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (-0.5 - 1.0 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0.5 - 1.0 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0x0.fffffffffffff8p0 + 0x1p-52 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0x0.fffffffffffff8p0 - 0x1p-52 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0x0.ffffffp0 + 0x1p-23 i)": -float: 2 -ifloat: 2 -Test "Imaginary part of: cacos (-0x0.ffffffp0 - 0x1p-23 i)": -float: 2 -ifloat: 2 -Test "Imaginary part of: cacos (-0x1.000002p0 + 0x1p-23 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1.000002p0 - 0x1p-23 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1.fp-10 + 1.0 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0x1.fp-10 - 1.0 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (-0x1.fp-100 + 1.0 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1.fp-100 + 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1.fp-100 - 1.0 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1.fp-100 - 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1.fp-1000 + 1.0 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0x1.fp-1000 - 1.0 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0x1.fp-1025 + 1.0 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0x1.fp-1025 + 1.5 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0x1.fp-1025 - 1.0 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (-0x1.fp-1025 - 1.5 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (-0x1.fp-129 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1.fp-129 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1.fp-129 + 0x0.ffffffp0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1.fp-129 + 0x1.000002p0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1.fp-129 + 0x1.fp-129 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1.fp-129 + 0x1p-23 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1.fp-129 + 1.0 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1.fp-129 + 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1.fp-129 + 1.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1.fp-129 + 1.5 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (-0x1.fp-129 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1.fp-129 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1.fp-129 - 0x0.ffffffp0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1.fp-129 - 0x1.000002p0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1.fp-129 - 0x1.fp-129 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1.fp-129 - 0x1p-23 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1.fp-129 - 1.0 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1.fp-129 - 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1.fp-129 - 1.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1.fp-129 - 1.5 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (-0x1.fp-30 + 1.0 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1.fp-30 + 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1.fp-30 - 1.0 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1.fp-30 - 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-105 + 0.0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-105 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1p-105 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-105 + 0x1p-105 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-105 - 0.0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-105 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1p-105 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-105 - 0x1p-105 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-112 + 0.0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-112 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1p-112 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-112 + 0x1p-112 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-112 - 0.0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-112 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1p-112 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-112 - 0x1p-112 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-23 + 0.0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-23 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1p-23 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1p-23 + 0x0.ffffffp0 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (-0x1p-23 + 0x1.fp-129 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-23 + 0x1p-23 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-23 - 0.0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-23 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1p-23 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1p-23 - 0x0.ffffffp0 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (-0x1p-23 - 0x1.fp-129 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-23 - 0x1p-23 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-52 + 0.0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-52 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1p-52 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-52 + 0x1p-52 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-52 - 0.0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-52 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1p-52 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-52 - 0x1p-52 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-63 + 0.0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-63 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1p-63 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-63 + 0x1p-63 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-63 - 0.0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-63 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-0x1p-63 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-0x1p-63 - 0x1p-63 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-1.0 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-1.0 + 0x1.fp-10 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-1.0 + 0x1p50 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-1.0 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (-1.0 - 0x1.fp-10 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-1.0 - 0x1p50 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (-2 - 3 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0.25 + 1.0 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0.25 - 1.0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (0.5 + +0 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0.5 + 0x1.fp-1025 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0.5 + 0x1.fp-129 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0.5 + 0x1.fp-129 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0.5 + 0x1p-105 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0.5 + 0x1p-105 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0.5 + 0x1p-112 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0.5 + 0x1p-112 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0.5 + 0x1p-23 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0.5 + 0x1p-52 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0.5 + 0x1p-63 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0.5 + 1.0 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0.5 + 1.0 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0.5 - 0 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0.5 - 0x1.fp-1025 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0.5 - 0x1.fp-129 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0.5 - 0x1.fp-129 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0.5 - 0x1p-105 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0.5 - 0x1p-105 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0.5 - 0x1p-112 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0.5 - 0x1p-112 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0.5 - 0x1p-23 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0.5 - 0x1p-52 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0.5 - 0x1p-63 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0.5 - 1.0 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0.5 - 1.0 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0x0.fffffffffffff8p0 + 0x1p-52 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0x0.fffffffffffff8p0 - 0x1p-52 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0x0.ffffffp0 + 0.0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (0x0.ffffffp0 + 0x1.fp-129 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (0x0.ffffffp0 + 0x1p-23 i)": -float: 2 -ifloat: 2 -Test "Imaginary part of: cacos (0x0.ffffffp0 + 0x1p-23 i)": -float: 2 -ifloat: 2 -Test "Real part of: cacos (0x0.ffffffp0 - 0.0 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (0x0.ffffffp0 - 0x1.fp-129 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (0x0.ffffffp0 - 0x1p-23 i)": -float: 2 -ifloat: 2 -Test "Imaginary part of: cacos (0x0.ffffffp0 - 0x1p-23 i)": -float: 2 -ifloat: 2 -Test "Real part of: cacos (0x1.0000000000001p0 + 0x1p-52 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0x1.0000000000001p0 - 0x1p-52 i)": -double: 1 -idouble: 1 -Test "Real part of: cacos (0x1.000002p0 + 0x1p-23 i)": -float: 2 -ifloat: 2 -Test "Imaginary part of: cacos (0x1.000002p0 + 0x1p-23 i)": -float: 1 -ifloat: 1 -Test "Real part of: cacos (0x1.000002p0 - 0x1p-23 i)": -float: 2 -ifloat: 2 -Test "Imaginary part of: cacos (0x1.000002p0 - 0x1p-23 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0x1.fp-10 + 1.0 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0x1.fp-10 - 1.0 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0x1.fp-100 + 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0x1.fp-100 - 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0x1.fp-1000 + 1.0 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0x1.fp-1000 - 1.0 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0x1.fp-1025 + 1.0 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0x1.fp-1025 + 1.5 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0x1.fp-1025 - 1.0 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0x1.fp-1025 - 1.5 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0x1.fp-129 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0x1.fp-129 + 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0x1.fp-129 + 1.5 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0x1.fp-129 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0x1.fp-129 - 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0x1.fp-129 - 1.5 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0x1.fp-30 + 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0x1.fp-30 - 1.0 i)": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0x1.fp1023 + 0x1.fp1023 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0x1.fp127 + 0x1.fp127 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0x1p-105 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0x1p-105 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0x1p-112 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0x1p-112 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0x1p-23 + 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0x1p-23 + 0x0.ffffffp0 i)": -double: 1 -idouble: 1 -Test "Imaginary part of: cacos (0x1p-23 - 0.5 i)": -float: 1 -ifloat: 1 -Test "Imaginary part of: cacos (0x1p-23 - 0x0.ffffffp0 i)": -double: 1 -idouble: 1 -Test "Im