mirror of
https://sourceware.org/git/glibc.git
synced 2025-09-02 16:01:20 +03:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user