aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-12-04 20:58:15 +0000
committerUlrich Drepper <drepper@redhat.com>1998-12-04 20:58:15 +0000
commita6ff34d7b0b59a1ad501dca25558ba21f6e539bb (patch)
treeeabe576c69bb878112d903d1e08836bab8c8aed1 /math
parentfcb7e0a5f7722609d78739d8ef590fcfd2ed2109 (diff)
downloadglibc-a6ff34d7b0b59a1ad501dca25558ba21f6e539bb.tar.xz
glibc-a6ff34d7b0b59a1ad501dca25558ba21f6e539bb.zip
Update.
1998-12-04 Ulrich Drepper <drepper@cygnus.com> * argp/argp.h: Add __retrict. * dirent/dirent.h: Likewise. * elf/dlfcn.h: Likewise. * grp/grp.h: Likewise. * iconv/iconv.h: Likewise. * inet/aliases.h: Likewise. * libio/libio.h: Likewise. * libio/stdio.h: Likewise. * locale/locale.h: Likewise. * misc/mntent.h: Likewise. * posix/wordexp.h: Likewise. * pwd/pwd.h: Likewise. * resolv/netdb.h: Likewise. * rt/aio.h: Likewise. * stdio-common/printf.h: Likewise. * stdlib/monetary.h: Likewise. * stdlib/stdlib.h: Likewise. * string/argz.h: Likewise. * string/envz.h: Likewise. * string/string.h: Likewise. * time/time.h: Likewise. 1998-12-04 Zack Weinberg <zack@rabi.phys.columbia.edu> * misc/sys/cdefs.h: Only include features.h if _FEATURES_H isn't defined. gcc's redundant include optimizer isn't clever enough to prevent a reinclusion here. Define __restrict to the empty string only if not GCC or GCC version less than 2.92. 1998-12-03 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * sysdeps/unix/sysv/linux/configure.in: Fix last change. 1998-12-03 Mark Kettenis <kettenis@phys.uva.nl> * time/strptime.c (strptime_internal): Make use of `%C' format specifier if it is seen together with the `%y' specifier. 1998-12-04 Ulrich Drepper <drepper@cygnus.com> * po/sk.po: New file. 1998-12-03 Scott Bambrough <scottb@corelcomputer.com> * sysdeps/arm/dl-machine.h (dl_start_user): Incorrect address for _dl_main_searchlist passed to _dl_init_next. 1998-12-02 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * math/libm-test.c: Expand literal tabs in strings. Normalize whitespace. 1998-12-02 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * sysdeps/unix/sysv/linux/sys/fsuid.h: Fix spelling.
Diffstat (limited to 'math')
-rw-r--r--math/libm-test.c1720
1 files changed, 860 insertions, 860 deletions
diff --git a/math/libm-test.c b/math/libm-test.c
index 2f57ef21bd..b1452c2022 100644
--- a/math/libm-test.c
+++ b/math/libm-test.c
@@ -157,10 +157,10 @@ typedef MATHTYPE (*mathfunc) (MATHTYPE);
#define ISINF(x) \
-(sizeof (x) == sizeof (float) ? \
- isinff (x) \
- : sizeof (x) == sizeof (double) ? \
- isinf (x) : isinfl (x))
+(sizeof (x) == sizeof (float) \
+ ? isinff (x) \
+ : sizeof (x) == sizeof (double) \
+ ? isinf (x) : isinfl (x))
/* Test if Floating-Point stack hasn't changed */
@@ -171,7 +171,7 @@ fpstack_test (const char *test_name)
static int old_stack;
int sw;
- asm ("fnstsw":"=a" (sw));
+ asm ("fnstsw" : "=a" (sw));
sw >>= 11;
sw &= 7;
@@ -213,7 +213,7 @@ random_value (MATHTYPE min_value, MATHTYPE max_value)
static MATHTYPE
random_greater (MATHTYPE min_value)
{
- return random_value (min_value, 1e6); /* CHOOSE(LDBL_MAX, DBL_MAX, FLT_MAX) */
+ return random_value (min_value, 1e6); /* CHOOSE (LDBL_MAX, DBL_MAX, FLT_MAX) */
}
@@ -451,12 +451,12 @@ output_result (const char *test_name, int result,
if (verbose > 1 && print_values)
{
printf ("Result:\n");
- printf (" is: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
+ printf (" is: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
computed, computed);
- printf (" should be: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
+ printf (" should be: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
expected, expected);
if (print_diff)
- printf (" difference: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR
+ printf (" difference: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR
"\n", difference, difference);
}
++noErrors;
@@ -484,14 +484,14 @@ output_result_ext (const char *test_name, int result,
if (verbose > 1 && print_values)
{
printf ("Result:\n");
- printf (" is: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
+ printf (" is: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
computed, computed);
- printf (" should be: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
+ printf (" should be: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
expected, expected);
if (print_diff)
- printf (" difference: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR
+ printf (" difference: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR
"\n", difference, difference);
- printf ("Parameter: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
+ printf ("Parameter: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
parameter, parameter);
}
++noErrors;
@@ -596,8 +596,8 @@ check_int (const char *test_name, int computed, int expected)
if (verbose > 1)
{
printf ("Result:\n");
- printf (" is: %d\n", computed);
- printf (" should be: %d\n", expected);
+ printf (" is: %d\n", computed);
+ printf (" should be: %d\n", expected);
}
noErrors++;
}
@@ -627,8 +627,8 @@ check_long (const char *test_name, long int computed, long int expected)
if (verbose > 1)
{
printf ("Result:\n");
- printf (" is: %ld\n", computed);
- printf (" should be: %ld\n", expected);
+ printf (" is: %ld\n", computed);
+ printf (" should be: %ld\n", expected);
}
noErrors++;
}
@@ -659,8 +659,8 @@ check_longlong (const char *test_name, long long int computed,
if (verbose > 1)
{
printf ("Result:\n");
- printf (" is: %lld\n", computed);
- printf (" should be: %lld\n", expected);
+ printf (" is: %lld\n", computed);
+ printf (" should be: %lld\n", expected);
}
noErrors++;
}
@@ -825,12 +825,12 @@ acos_test (void)
check ("acos (-1) == pi", FUNC(acos) (-1), M_PIl);
check_eps ("acos (0.5) == pi/3", FUNC(acos) (0.5), M_PI_6l * 2.0,
- CHOOSE(1e-18, 0, 0));
+ CHOOSE (1e-18, 0, 0));
check_eps ("acos (-0.5) == 2*pi/3", FUNC(acos) (-0.5), M_PI_6l * 4.0,
- CHOOSE(1e-17, 0, 0));
+ CHOOSE (1e-17, 0, 0));
check_eps ("acos (0.7) == 0.795398830...", FUNC(acos) (0.7),
- 0.7953988301841435554L, CHOOSE(7e-17L, 0, 0));
+ 0.7953988301841435554L, CHOOSE (7e-17L, 0, 0));
}
@@ -849,7 +849,7 @@ acosh_test (void)
check ("acosh(1) == 0", FUNC(acosh) (1), 0);
check_eps ("acosh(7) == 2.633915793...", FUNC(acosh) (7),
- 2.6339157938496334172L, CHOOSE(3e-19, 0, 0));
+ 2.6339157938496334172L, CHOOSE (3e-19, 0, 0));
}
@@ -873,13 +873,13 @@ asin_test (void)
check ("asin (0) == 0", FUNC(asin) (0), 0);
check ("asin (-0) == -0", FUNC(asin) (minus_zero), minus_zero);
check_eps ("asin (0.5) == pi/6", FUNC(asin) (0.5), M_PI_6l,
- CHOOSE(3.5e-18, 0, 2e-7));
+ CHOOSE (3.5e-18, 0, 2e-7));
check_eps ("asin (-0.5) == -pi/6", FUNC(asin) (-0.5), -M_PI_6l,
- CHOOSE(3.5e-18, 0, 2e-7));
- check ("asin (1.0) == pi/2", FUNC(asin) (1.0), M_PI_2l);
+ CHOOSE (3.5e-18, 0, 2e-7));
+ check ("asin (1.0) == pi/2", FUNC(asin) (1.0), M_PI_2l);
check ("asin (-1.0) == -pi/2", FUNC(asin) (-1.0), -M_PI_2l);
check_eps ("asin (0.7) == 0.775397496...", FUNC(asin) (0.7),
- 0.7753974966107530637L, CHOOSE(7e-17L, 2e-16, 2e-7));
+ 0.7753974966107530637L, CHOOSE (7e-17L, 2e-16, 2e-7));
}
@@ -893,7 +893,7 @@ asinh_test (void)
check_isinfn ("asinh(-inf) == -inf", FUNC(asinh) (minus_infty));
#endif
check_eps ("asinh(0.7) == 0.652666566...", FUNC(asinh) (0.7),
- 0.652666566082355786L, CHOOSE(4e-17L, 0, 6e-8));
+ 0.652666566082355786L, CHOOSE (4e-17L, 0, 6e-8));
}
@@ -907,12 +907,12 @@ atan_test (void)
check ("atan (-inf) == -pi/2", FUNC(atan) (minus_infty), -M_PI_2l);
check_eps ("atan (1) == pi/4", FUNC(atan) (1), M_PI_4l,
- CHOOSE(1e-18, 0, 0));
+ CHOOSE (1e-18, 0, 0));
check_eps ("atan (-1) == -pi/4", FUNC(atan) (1), M_PI_4l,
- CHOOSE(1e-18, 0, 0));
+ CHOOSE (1e-18, 0, 0));
check_eps ("atan (0.7) == 0.610725964...", FUNC(atan) (0.7),
- 0.6107259643892086165L, CHOOSE(3e-17L, 0, 0));
+ 0.6107259643892086165L, CHOOSE (3e-17L, 0, 0));
}
@@ -992,9 +992,9 @@ atan2_test (void)
/* FIXME: Add some specific tests */
check_eps ("atan2 (0.7,1) == 0.61072...", FUNC(atan2) (0.7, 1),
- 0.6107259643892086165L, CHOOSE(3e-17L, 0, 0));
+ 0.6107259643892086165L, CHOOSE (3e-17L, 0, 0));
check_eps ("atan2 (0.4,0.0003) == 1.57004...", FUNC(atan2) (0.4, 0.0003),
- 1.5700463269355215718L, CHOOSE(2e-19L, 0, 1.2e-7));
+ 1.5700463269355215718L, CHOOSE (2e-19L, 0, 1.2e-7));
}
@@ -1024,7 +1024,7 @@ atanh_test (void)
#endif
check_eps ("atanh(0.7) == 0.867300527...", FUNC(atanh) (0.7),
- 0.8673005276940531944L, CHOOSE(9e-17L, 2e-16, 0));
+ 0.8673005276940531944L, CHOOSE (9e-17L, 2e-16, 0));
}
@@ -1040,14 +1040,14 @@ cbrt_test (void)
check_isnan ("cbrt (NaN) == NaN", FUNC(cbrt) (nan_value));
#endif
check_eps ("cbrt (-0.001) == -0.1", FUNC(cbrt) (-0.001), -0.1,
- CHOOSE(5e-18L, 0, 0));
- check_eps ("cbrt (8) == 2", FUNC(cbrt) (8), 2, CHOOSE(5e-17L, 0, 0));
+ CHOOSE (5e-18L, 0, 0));
+ check_eps ("cbrt (8) == 2", FUNC(cbrt) (8), 2, CHOOSE (5e-17L, 0, 0));
check_eps ("cbrt (-27) == -3", FUNC(cbrt) (-27.0), -3.0,
- CHOOSE(3e-16L, 5e-16, 0));
+ CHOOSE (3e-16L, 5e-16, 0));
check_eps ("cbrt (0.970299) == 0.99", FUNC(cbrt) (0.970299), 0.99,
- CHOOSE(2e-17L, 2e-16, 0));
+ CHOOSE (2e-17L, 2e-16, 0));
check_eps ("cbrt (0.7) == .8879040017...", FUNC(cbrt) (0.7),
- 0.8879040017426007084L, CHOOSE(2e-17L, 6e-16, 0));
+ 0.8879040017426007084L, CHOOSE (2e-17L, 6e-16, 0));
}
@@ -1077,14 +1077,14 @@ cos_test (void)
INVALID_EXCEPTION);
check_eps ("cos (pi/3) == 0.5", FUNC(cos) (M_PI_6l * 2.0),
- 0.5, CHOOSE(4e-18L, 1e-15L, 1e-7L));
+ 0.5, CHOOSE (4e-18L, 1e-15L, 1e-7L));
check_eps ("cos (2*pi/3) == -0.5", FUNC(cos) (M_PI_6l * 4.0),
- -0.5, CHOOSE(4e-18L, 1e-15L, 1e-7L));
+ -0.5, CHOOSE (4e-18L, 1e-15L, 1e-7L));
check_eps ("cos (pi/2) == 0", FUNC(cos) (M_PI_2l),
- 0, CHOOSE(1e-19L, 1e-16L, 1e-7L));
+ 0, CHOOSE (1e-19L, 1e-16L, 1e-7L));
check_eps ("cos (0.7) == 0.7648421872...", FUNC(cos) (0.7),
- 0.7648421872844884262L, CHOOSE(3e-17, 2e-16, 6e-8));
+ 0.7648421872844884262L, CHOOSE (3e-17, 2e-16, 6e-8));
}
@@ -1100,7 +1100,7 @@ cosh_test (void)
#endif
check_eps ("cosh (0.7) == 1.2551690056...", FUNC(cosh) (0.7),
- 1.255169005630943018L, CHOOSE(4e-17L, 0, 0));
+ 1.255169005630943018L, CHOOSE (4e-17L, 0, 0));
}
@@ -1119,7 +1119,7 @@ erf_test (void)
check ("erf (-inf) == -1", FUNC(erf) (minus_infty), -1);
check_eps ("erf (0.7) == 0.6778011938...", FUNC(erf) (0.7),
- 0.67780119383741847297L, CHOOSE(0, 2e-16, 0));
+ 0.67780119383741847297L, CHOOSE (0, 2e-16, 0));
}
@@ -1138,7 +1138,7 @@ erfc_test (void)
check ("erfc (-0) == 1", FUNC(erfc) (minus_zero), 1.0);
check_eps ("erfc (0.7) == 0.3221988061...", FUNC(erfc) (0.7),
- 0.32219880616258152702L, CHOOSE(0, 6e-17, 0));
+ 0.32219880616258152702L, CHOOSE (0, 6e-17, 0));
}
@@ -1152,14 +1152,14 @@ exp_test (void)
check_isinfp ("exp (+inf) == +inf", FUNC(exp) (plus_infty));
check ("exp (-inf) == 0", FUNC(exp) (minus_infty), 0);
#endif
- check_eps ("exp (1) == e", FUNC(exp) (1), M_El, CHOOSE(4e-18L, 0, 0));
+ check_eps ("exp (1) == e", FUNC(exp) (1), M_El, CHOOSE (4e-18L, 0, 0));
check_eps ("exp (2) == e^2", FUNC(exp) (2), M_E2l,
- CHOOSE(1e-18, 0, 0));
+ CHOOSE (1e-18, 0, 0));
check_eps ("exp (3) == e^3", FUNC(exp) (3), M_E3l,
- CHOOSE(1.5e-17, 0, 0));
+ CHOOSE (1.5e-17, 0, 0));
check_eps ("exp (0.7) == 2.0137527074...", FUNC(exp) (0.7),
- 2.0137527074704765216L, CHOOSE(9e-17L, 0, 0));
+ 2.0137527074704765216L, CHOOSE (9e-17L, 0, 0));
}
@@ -1178,13 +1178,13 @@ exp10_test (void)
check_isinfp ("exp10 (+inf) == +inf", FUNC(exp10) (plus_infty));
check ("exp10 (-inf) == 0", FUNC(exp10) (minus_infty), 0);
check_eps ("exp10 (3) == 1000", FUNC(exp10) (3), 1000,
- CHOOSE(5e-16, 7e-13, 2e-4));
+ CHOOSE (5e-16, 7e-13, 2e-4));
check_eps ("exp10 (-1) == 0.1", FUNC(exp10) (-1), 0.1,
- CHOOSE(6e-18, 3e-17, 8e-09));
+ CHOOSE (6e-18, 3e-17, 8e-09));
check_isinfp ("exp10 (1e6) == +inf", FUNC(exp10) (1e6));
check ("exp10 (-1e6) == 0", FUNC(exp10) (-1e6), 0);
check_eps ("exp10 (0.7) == 5.0118723...", FUNC(exp10) (0.7),
- 5.0118723362727228500L, CHOOSE(6e-16, 9e-16, 5e-7));
+ 5.0118723362727228500L, CHOOSE (6e-16, 9e-16, 5e-7));
}
@@ -1207,7 +1207,7 @@ exp2_test (void)
check_isinfp ("exp2 (1e6) == +inf", FUNC(exp2) (1e6));
check ("exp2 (-1e6) == 0", FUNC(exp2) (-1e6), 0);
check_eps ("exp2 (0.7) == 1.6245047927...", FUNC(exp2) (0.7),
- 1.6245047927124710452L, CHOOSE(6e-17L, 0, 6e-8));
+ 1.6245047927124710452L, CHOOSE (6e-17L, 0, 6e-8));
}
@@ -1223,10 +1223,10 @@ expm1_test (void)
#endif
check_eps ("expm1 (1) == e-1", FUNC(expm1) (1), M_El - 1.0,
- CHOOSE(4e-18L, 0, 2e-7));
+ CHOOSE (4e-18L, 0, 2e-7));
check_eps ("expm1 (0.7) == 1.01375...", FUNC(expm1) (0.7),
- 1.0137527074704765216L, CHOOSE(9e-17L, 0, 0));
+ 1.0137527074704765216L, CHOOSE (9e-17L, 0, 0));
}
@@ -1252,10 +1252,10 @@ check_frexp (const char *test_name, MATHTYPE computed, MATHTYPE expected,
if (verbose > 1)
{
printf ("Result:\n");
- printf (" is: %.20" PRINTF_EXPR " *2^%d %.20"
+ printf (" is: %.20" PRINTF_EXPR " *2^%d %.20"
PRINTF_XEXPR "*2^%d\n",
computed, comp_int, computed, comp_int);
- printf (" should be: %.20" PRINTF_EXPR " *2^%d %.20"
+ printf (" should be: %.20" PRINTF_EXPR " *2^%d %.20"
PRINTF_XEXPR "*2^%d\n",
expected, exp_int, expected, exp_int);
printf (" difference: %.20" PRINTF_EXPR " %.20" PRINTF_XEXPR "\n",
@@ -1393,12 +1393,12 @@ gamma_test (void)
signgam = 0;
check_eps ("gamma (0.5) == log(sqrt(pi))", FUNC(gamma) (0.5),
- FUNC(log) (FUNC(sqrt) (M_PIl)), CHOOSE(0, 1e-15, 1e-7));
+ FUNC(log) (FUNC(sqrt) (M_PIl)), CHOOSE (0, 1e-15, 1e-7));
check_int ("gamma (0.5) sets signgam to 1", signgam, 1);
signgam = 0;
check_eps ("gamma (-0.5) == log(2*sqrt(pi))", FUNC(gamma) (-0.5),
- FUNC(log) (2*FUNC(sqrt) (M_PIl)), CHOOSE(0, 1e-15, 0));
+ FUNC(log) (2*FUNC(sqrt) (M_PIl)), CHOOSE (0, 1e-15, 0));
check_int ("gamma (-0.5) sets signgam to -1", signgam, -1);
}
@@ -1424,15 +1424,15 @@ tgamma_test (void)
FUNC(tgamma) (minus_infty), INVALID_EXCEPTION);
check_eps ("tgamma (0.5) == sqrt(pi)", FUNC(tgamma) (0.5),
- FUNC(sqrt) (M_PIl), CHOOSE(0, 5e-16, 2e-7));
+ FUNC(sqrt) (M_PIl), CHOOSE (0, 5e-16, 2e-7));
check_eps ("tgamma (-0.5) == -2*sqrt(pi)", FUNC(tgamma) (-0.5),
- -2*FUNC(sqrt) (M_PIl), CHOOSE(0, 5e-16, 3e-7));
+ -2*FUNC(sqrt) (M_PIl), CHOOSE (0, 5e-16, 3e-7));
check ("tgamma (1) == 1", FUNC(tgamma) (1), 1);
check ("tgamma (4) == 6", FUNC(tgamma) (4), 6);
check_eps ("tgamma (0.7) == 1.29805...", FUNC(tgamma) (0.7),
- 1.29805533264755778568L, CHOOSE(0, 3e-16, 2e-7));
+ 1.29805533264755778568L, CHOOSE (0, 3e-16, 2e-7));
check ("tgamma (1.2) == 0.91816...", FUNC(tgamma) (1.2),
0.91816874239976061064L);
}
@@ -1467,23 +1467,23 @@ lgamma_test (void)
signgam = 0;
check_eps ("lgamma (0.5) == log(sqrt(pi))", FUNC(lgamma) (0.5),
- FUNC(log) (FUNC(sqrt) (M_PIl)), CHOOSE(0, 1e-15, 1e-7));
+ FUNC(log) (FUNC(sqrt) (M_PIl)), CHOOSE (0, 1e-15, 1e-7));
check_int ("lgamma (0.5) sets signgam to 1", signgam, 1);
signgam = 0;
check_eps ("lgamma (-0.5) == log(2*sqrt(pi))", FUNC(lgamma) (-0.5),
- FUNC(log) (2*FUNC(sqrt) (M_PIl)), CHOOSE(0, 1e-15, 0));
+ FUNC(log) (2*FUNC(sqrt) (M_PIl)), CHOOSE (0, 1e-15, 0));
check_int ("lgamma (-0.5) sets signgam to -1", signgam, -1);
signgam = 0;
check_eps ("lgamma (0.7) == 0.26086...", FUNC(lgamma) (0.7),
- 0.26086724653166651439L, CHOOSE(0, 6e-17, 3e-8));
+ 0.26086724653166651439L, CHOOSE (0, 6e-17, 3e-8));
check_int ("lgamma (0.7) sets signgam to 1", signgam, 1);
signgam = 0;
check_eps ("lgamma (1.2) == -0.08537...", FUNC(lgamma) (1.2),
- -0.853740900033158497197e-1L, CHOOSE(0, 2e-17, 2e-8));
+ -0.853740900033158497197e-1L, CHOOSE (0, 2e-17, 2e-8));
check_int ("lgamma (1.2) sets signgam to 1", signgam, 1);
}
@@ -1542,15 +1542,15 @@ log_test (void)
FUNC(log) (-1), INVALID_EXCEPTION);
check_isinfp ("log (+inf) == +inf", FUNC(log) (plus_infty));
- check_eps ("log (e) == 1", FUNC(log) (M_El), 1, CHOOSE(1e-18L, 0, 9e-8L));
+ check_eps ("log (e) == 1", FUNC(log) (M_El), 1, CHOOSE (1e-18L, 0, 9e-8L));
check_eps ("log (1/e) == -1", FUNC(log) (1.0 / M_El), -1,
- CHOOSE(2e-18L, 0, 0));
+ CHOOSE (2e-18L, 0, 0));
check_eps ("log (2) == M_LN2", FUNC(log) (2), M_LN2l,
- CHOOSE(6e-20L, 0, 0));
+ CHOOSE (6e-20L, 0, 0));
check_eps ("log (10) == M_LN10", FUNC(log) (10), M_LN10l,
- CHOOSE(1e-18L, 0, 0));
+ CHOOSE (1e-18L, 0, 0));
check_eps ("log (0.7) == -0.3566749439...", FUNC(log) (0.7),
- -0.35667494393873237891L, CHOOSE(7e-17L, 6e-17, 3e-8));
+ -0.35667494393873237891L, CHOOSE (7e-17L, 6e-17, 3e-8));
}
@@ -1570,16 +1570,16 @@ log10_test (void)
check_isinfp ("log10 (+inf) == +inf", FUNC(log10) (plus_infty));
check_eps ("log10 (0.1) == -1", FUNC(log10) (0.1L), -1,
- CHOOSE(1e-18L, 0, 0));
+ CHOOSE (1e-18L, 0, 0));
check_eps ("log10 (10) == 1", FUNC(log10) (10.0), 1,
- CHOOSE(1e-18L, 0, 0));
+ CHOOSE (1e-18L, 0, 0));
check_eps ("log10 (100) == 2", FUNC(log10) (100.0), 2,
- CHOOSE(1e-18L, 0, 0));
+ CHOOSE (1e-18L, 0, 0));
check ("log10 (10000) == 4", FUNC(log10) (10000.0), 4);
check_eps ("log10 (e) == M_LOG10E", FUNC(log10) (M_El), M_LOG10El,
- CHOOSE(1e-18, 0, 9e-8));
+ CHOOSE (1e-18, 0, 9e-8));
check_eps ("log10 (0.7) == -0.1549019599...", FUNC(log10) (0.7),
- -0.15490195998574316929L, CHOOSE(3e-17L, 3e-17, 2e-8));
+ -0.15490195998574316929L, CHOOSE (3e-17L, 3e-17, 2e-8));
}
@@ -1597,10 +1597,10 @@ log1p_test (void)
check_isinfp ("log1p (+inf) == +inf", FUNC(log1p) (plus_infty));
check_eps ("log1p (e-1) == 1", FUNC(log1p) (M_El - 1.0), 1,
- CHOOSE(1e-18L, 0, 6e-8));
+ CHOOSE (1e-18L, 0, 6e-8));
check_eps ("log1p (-0.3) == -0.35667...", FUNC(log1p) (-0.3),
- -0.35667494393873237891L, CHOOSE(2e-17L, 6e-17, 3e-8));
+ -0.35667494393873237891L, CHOOSE (2e-17L, 6e-17, 3e-8));
}
@@ -1620,12 +1620,12 @@ log2_test (void)
check_isinfp ("log2 (+inf) == +inf", FUNC(log2) (plus_infty));
check_eps ("log2 (e) == M_LOG2E", FUNC(log2) (M_El), M_LOG2El,
- CHOOSE(1e-18L, 0, 0));
+ CHOOSE (1e-18L, 0, 0));
check ("log2 (2) == 1", FUNC(log2) (2.0), 1);
- check_eps ("log2 (16) == 4", FUNC(log2) (16.0), 4, CHOOSE(1e-18L, 0, 0));
+ check_eps ("log2 (16) == 4", FUNC(log2) (16.0), 4, CHOOSE (1e-18L, 0, 0));
check ("log2 (256) == 8", FUNC(log2) (256.0), 8);
check_eps ("log2 (0.7) == -0.5145731728...", FUNC(log2) (0.7),
- -0.51457317282975824043L, CHOOSE(1e-16L, 2e-16, 6e-8));
+ -0.51457317282975824043L, CHOOSE (1e-16L, 2e-16, 6e-8));
}
@@ -1695,7 +1695,7 @@ modf_test (void)
result = FUNC(modf) (89.6, &intpart);
check_eps ("modf (89.6, &x) returns 0.6", result, 0.6,
- CHOOSE(6e-15L, 6e-15, 2e-6));
+ CHOOSE (6e-15L, 6e-15, 2e-6));
check ("modf (89.6, &x) sets x to 89", intpart, 89);
}
@@ -1803,13 +1803,13 @@ sin_test (void)
INVALID_EXCEPTION);
check_eps ("sin (pi/6) == 0.5", FUNC(sin) (M_PI_6l),
- 0.5, CHOOSE(4e-18L, 0, 0));
+ 0.5, CHOOSE (4e-18L, 0, 0));
check_eps ("sin (-pi/6) == -0.5", FUNC(sin) (-M_PI_6l),
- -0.5, CHOOSE(4e-18L, 0, 0));
+ -0.5, CHOOSE (4e-18L, 0, 0));
check ("sin (pi/2) == 1", FUNC(sin) (M_PI_2l), 1);
check ("sin (-pi/2) == -1", FUNC(sin) (-M_PI_2l), -1);
check_eps ("sin (0.7) == 0.6442176872...", FUNC(sin) (0.7),
- 0.64421768723769105367L, CHOOSE(4e-17L, 0, 0));
+ 0.64421768723769105367L, CHOOSE (4e-17L, 0, 0));
}
@@ -1826,7 +1826,7 @@ sinh_test (void)
#endif
check_eps ("sinh (0.7) == 0.7585837018...", FUNC(sinh) (0.7),
- 0.75858370183953350346L, CHOOSE(6e-17L, 2e-16, 6e-8));
+ 0.75858370183953350346L, CHOOSE (6e-17L, 2e-16, 6e-8));
}
@@ -1869,21 +1869,21 @@ sincos_test (void)
check ("sincos (pi/2, &sin, &cos) puts 1 in sin", sin_res, 1);
fesetenv (&fenv);
check_eps ("sincos (pi/2, &sin, &cos) puts 0 in cos", cos_res, 0,
- CHOOSE(1e-18L, 1e-16, 1e-7));
+ CHOOSE (1e-18L, 1e-16, 1e-7));
FUNC(sincos) (M_PI_6l, &sin_res, &cos_res);
check_eps ("sincos (pi/6, &sin, &cos) puts 0.5 in sin", sin_res, 0.5,
- CHOOSE(5e-18L, 0, 0));
+ CHOOSE (5e-18L, 0, 0));
FUNC(sincos) (M_PI_6l*2.0, &sin_res, &cos_res);
check_eps ("sincos (pi/3, &sin, &cos) puts 0.5 in cos", cos_res, 0.5,
- CHOOSE(5e-18L, 1e-15, 1e-7));
+ CHOOSE (5e-18L, 1e-15, 1e-7));
FUNC(sincos) (0.7, &sin_res, &cos_res);
check_eps ("sincos (0.7, &sin, &cos) puts 0.6442176872... in sin", sin_res,
- 0.64421768723769105367L, CHOOSE(4e-17L, 0, 0));
+ 0.64421768723769105367L, CHOOSE (4e-17L, 0, 0));
check_eps ("sincos (0.7, &sin, &cos) puts 0.7648421872... in cos", cos_res,
- 0.76484218728448842626L, CHOOSE(3e-17L, 2e-16, 6e-8));
+ 0.76484218728448842626L, CHOOSE (3e-17L, 2e-16, 6e-8));
}
@@ -1898,9 +1898,9 @@ tan_test (void)
FUNC(tan) (minus_infty), INVALID_EXCEPTION);
check_eps ("tan (pi/4) == 1", FUNC(tan) (M_PI_4l), 1,
- CHOOSE(2e-18L, 1e-15L, 2e-7));
+ CHOOSE (2e-18L, 1e-15L, 2e-7));
check_eps ("tan (0.7) == 0.8422883804...", FUNC(tan) (0.7),
- 0.84228838046307944813L, CHOOSE(8e-17L, 0, 0));
+ 0.84228838046307944813L, CHOOSE (8e-17L, 0, 0));
}
@@ -1915,7 +1915,7 @@ tanh_test (void)
check ("tanh (-inf) == -1", FUNC(tanh) (minus_infty), -1);
#endif
check_eps ("tanh (0.7) == 0.6043677771...", FUNC(tanh) (0.7),
- 0.60436777711716349631L, CHOOSE(3e-17L, 2e-16, 6e-8));
+ 0.60436777711716349631L, CHOOSE (3e-17L, 2e-16, 6e-8));
}
@@ -1976,7 +1976,7 @@ hypot_test (void)
check ("hypot (x,0) == fabs (x)", FUNC(hypot) (5.7e7L, 0), 5.7e7L);
check_eps ("hypot (0.7,1.2) == 1.38924...", FUNC(hypot) (0.7, 1.2),
- 1.3892443989449804508L, CHOOSE(7e-17L, 3e-16, 0));
+ 1.3892443989449804508L, CHOOSE (7e-17L, 3e-16, 0));
}
@@ -2171,7 +2171,7 @@ pow_test (void)
FUNC(pow) (minus_zero, x), 0.0, x);
check_eps ("pow (0.7, 1.2) == 0.65180...", FUNC(pow) (0.7, 1.2),
- 0.65180494056638638188L, CHOOSE(4e-17L, 0, 0));
+ 0.65180494056638638188L, CHOOSE (4e-17L, 0, 0));
#ifdef TEST_DOUBLE
check ("pow (-7.49321e+133, -9.80818e+16) == 0",
@@ -2304,13 +2304,13 @@ fmod_test (void)
FUNC(fmod) (x, minus_infty), x, x);
check_eps ("fmod (6.5, 2.3) == 1.9", FUNC(fmod) (6.5, 2.3), 1.9,
- CHOOSE(5e-16, 1e-15, 2e-7));
+ CHOOSE (5e-16, 1e-15, 2e-7));
check_eps ("fmod (-6.5, 2.3) == -1.9", FUNC(fmod) (-6.5, 2.3), -1.9,
- CHOOSE(5e-16, 1e-15, 2e-7));
+ CHOOSE (5e-16, 1e-15, 2e-7));
check_eps ("fmod (6.5, -2.3) == 1.9", FUNC(fmod) (6.5, -2.3), 1.9,
- CHOOSE(5e-16, 1e-15, 2e-7));
+ CHOOSE (5e-16, 1e-15, 2e-7));
check_eps ("fmod (-6.5, -2.3) == -1.9", FUNC(fmod) (-6.5, -2.3), -1.9,
- CHOOSE(5e-16, 1e-15, 2e-7));
+ CHOOSE (5e-16, 1e-15, 2e-7));
}
@@ -2435,9 +2435,9 @@ sqrt_test (void)
check ("sqrt (0.25) == 0.5", FUNC(sqrt) (0.25), 0.5);
check ("sqrt (6642.25) == 81.5", FUNC(sqrt) (6642.25), 81.5);
check_eps ("sqrt (15239.903) == 123.45", FUNC(sqrt) (15239.903), 123.45,
- CHOOSE(3e-6L, 3e-6, 8e-6));
+ CHOOSE (3e-6L, 3e-6, 8e-6));
check_eps ("sqrt (0.7) == 0.8366600265", FUNC(sqrt) (0.7),
- 0.83666002653407554798L, CHOOSE(3e-17L, 0, 0));
+ 0.83666002653407554798L, CHOOSE (3e-17L, 0, 0));
}
@@ -2535,158 +2535,158 @@ cexp_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(cexp) (BUILD_COMPLEX(plus_zero, plus_zero));
+ result = FUNC(cexp) (BUILD_COMPLEX (plus_zero, plus_zero));
check ("real(cexp(0 + 0i)) = 1", __real__ result, 1);
check ("imag(cexp(0 + 0i)) = 0", __imag__ result, 0);
- result = FUNC(cexp) (BUILD_COMPLEX(minus_zero, plus_zero));
+ result = FUNC(cexp) (BUILD_COMPLEX (minus_zero, plus_zero));
check ("real(cexp(-0 + 0i)) = 1", __real__ result, 1);
check ("imag(cexp(-0 + 0i)) = 0", __imag__ result, 0);
- result = FUNC(cexp) (BUILD_COMPLEX(plus_zero, minus_zero));
+ result = FUNC(cexp) (BUILD_COMPLEX (plus_zero, minus_zero));
check ("real(cexp(0 - 0i)) = 1", __real__ result, 1);
check ("imag(cexp(0 - 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(cexp) (BUILD_COMPLEX(minus_zero, minus_zero));
+ result = FUNC(cexp) (BUILD_COMPLEX (minus_zero, minus_zero));
check ("real(cexp(-0 - 0i)) = 1", __real__ result, 1);
check ("imag(cexp(-0 - 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(cexp) (BUILD_COMPLEX(plus_infty, plus_zero));
+ result = FUNC(cexp) (BUILD_COMPLEX (plus_infty, plus_zero));
check_isinfp ("real(cexp(+inf + 0i)) = +inf", __real__ result);
check ("imag(cexp(+inf + 0i)) = 0", __imag__ result, 0);
- result = FUNC(cexp) (BUILD_COMPLEX(plus_infty, minus_zero));
+ result = FU