diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-10-29 17:38:14 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-10-29 17:38:14 +0000 |
commit | cd33623e19125a1c68fdb3866828d1dc31502cf5 (patch) | |
tree | 219ea89721650635534cba563523eb05048b54c5 /math/libm-test.inc | |
parent | 061d137bd7c64e3f80ec524685c4bccf98248f58 (diff) | |
download | glibc-cd33623e19125a1c68fdb3866828d1dc31502cf5.tar.gz glibc-cd33623e19125a1c68fdb3866828d1dc31502cf5.tar.xz glibc-cd33623e19125a1c68fdb3866828d1dc31502cf5.zip |
Update.
1999-10-29 Andreas Jaeger <aj@suse.de> * math/gen-libm-test.pl: New file to generate a table of libm-test-ulps values. 1999-10-29 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/sparc/sys/ptrace.h: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/profil-counter.h: Expect struct sigcontext* object as second parameter for profil_counter. Patches by Jakub Jelinek <jakub@redhat.com>. 1999-10-29 Andreas Jaeger <aj@suse.de> * sysdeps/unix/sysv/linux/fpathconf.c (__fpathconf): Handle reiserfs. * sysdeps/unix/sysv/linux/pathconf.c: Likewise. * sysdeps/unix/sysv/linux/linux_fsinfo.h: Add values for devpts, efs, qnx4 and reiser file systems. 1999-10-29 Andreas Jaeger <aj@suse.de> * locale/Makefile (others): Set to localedef and locale for make clean. * debug/Makefile (generated): Add xtrace for make clean to work. 1999-10-29 Andreas Jaeger <aj@suse.de> * stdlib/tst-strtod.c: Add two testcases for hexadecimal input. 1999-10-25 Andreas Jaeger <aj@suse.de> * math/libm-test.inc: Added code to ignore the given max ulps. (print_max_error): Check for ignore_max_ulp. (check_float_internal): Likewise. (parse_opt): Parse --ignore-max-ulp. (main): Initialize ignore_max_ulp.
Diffstat (limited to 'math/libm-test.inc')
-rw-r--r-- | math/libm-test.inc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc index 71a846f94f..d2ceb2ff69 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -158,6 +158,7 @@ static int noXPasses; /* number of unexpected passes. */ static int verbose; static int output_max_error; /* Should the maximal errors printed? */ static int output_points; /* Should the single function results printed? */ +static int ignore_max_ulp; /* Should we ignore max_ulp? */ static FLOAT minus_zero, plus_zero; static FLOAT plus_infty, minus_infty, nan_value; @@ -315,7 +316,7 @@ print_max_error (const char *func_name, FLOAT allowed, int xfail) { int ok = 0; - if (max_error <= allowed) + if (max_error == 0.0 || (max_error <= allowed && !ignore_max_ulp)) { ok = 1; } @@ -477,7 +478,7 @@ check_float_internal (const char *test_name, FLOAT computed, FLOAT expected, && (computed == 0.0 && expected == 0.0 && signbit(computed) != signbit (expected))) ok = 0; - else if (ulp <= max_ulp) + else if (ulp == 0.0 || (ulp <= max_ulp && !ignore_max_ulp)) ok = 1; else { @@ -3875,6 +3876,8 @@ static const struct argp_option options[] = "Don't output maximal errors of functions"}, { "no-points", 'p', NULL, 0, "Don't output results of functions invocations"}, + { "ignore-max-ulp", 'i', "yes/no", 0, + "Ignore given maximal errors"}, { NULL, 0, NULL, 0, NULL } }; @@ -3900,6 +3903,12 @@ parse_opt (int key, char *arg, struct argp_state *state) case 'f': output_max_error = 0; break; + case 'i': + if (strcmp (arg, "yes") == 0) + ignore_max_ulp = 1; + else if (strcmp (arg, "no") == 0) + ignore_max_ulp = 0; + break; case 'p': output_points = 0; break; @@ -3954,7 +3963,9 @@ main (int argc, char **argv) output_ulps = 0; output_max_error = 1; output_points = 1; - + /* XXX set to 0 for releases. */ + ignore_max_ulp = 0; + /* Parse and process arguments. */ argp_parse (&argp, argc, argv, 0, &remaining, NULL); |