mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
* math/libm-test.inc (print_ulps): Print ulp values rounded to
next whole number. (print_function_ulps): Likewise. (print_complex_function_ulps): Likewise. (print_max_error): Likewise. (print_complex_max_error): Likewise. Handle ignore_max_ulp.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2001-10-18 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* math/libm-test.inc (print_ulps): Print ulp values rounded to
|
||||||
|
next whole number.
|
||||||
|
(print_function_ulps): Likewise.
|
||||||
|
(print_complex_function_ulps): Likewise.
|
||||||
|
(print_max_error): Likewise.
|
||||||
|
(print_complex_max_error): Likewise. Handle ignore_max_ulp.
|
||||||
|
|
||||||
2001-10-16 Andreas Schwab <schwab@suse.de>
|
2001-10-16 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
* sysdeps/m68k/fpu/libm-test-ulps: Updated for fixed cbrtl
|
* sysdeps/m68k/fpu/libm-test-ulps: Updated for fixed cbrtl
|
||||||
|
@ -250,9 +250,10 @@ print_ulps (const char *test_name, FLOAT ulp)
|
|||||||
if (output_ulps)
|
if (output_ulps)
|
||||||
{
|
{
|
||||||
fprintf (ulps_file, "Test \"%s\":\n", test_name);
|
fprintf (ulps_file, "Test \"%s\":\n", test_name);
|
||||||
fprintf (ulps_file, "%s: % .4" PRINTF_NEXPR "\n",
|
fprintf (ulps_file, "%s: %.0" PRINTF_NEXPR "\n",
|
||||||
CHOOSE("ldouble", "double", "float",
|
CHOOSE("ldouble", "double", "float",
|
||||||
"ildouble", "idouble", "ifloat"), ulp);
|
"ildouble", "idouble", "ifloat"),
|
||||||
|
FUNC(ceil) (ulp));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -262,9 +263,10 @@ print_function_ulps (const char *function_name, FLOAT ulp)
|
|||||||
if (output_ulps)
|
if (output_ulps)
|
||||||
{
|
{
|
||||||
fprintf (ulps_file, "Function: \"%s\":\n", function_name);
|
fprintf (ulps_file, "Function: \"%s\":\n", function_name);
|
||||||
fprintf (ulps_file, "%s: % .4" PRINTF_NEXPR "\n",
|
fprintf (ulps_file, "%s: %.0" PRINTF_NEXPR "\n",
|
||||||
CHOOSE("ldouble", "double", "float",
|
CHOOSE("ldouble", "double", "float",
|
||||||
"ildouble", "idouble", "ifloat"), ulp);
|
"ildouble", "idouble", "ifloat"),
|
||||||
|
FUNC(ceil) (ulp));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -278,16 +280,18 @@ print_complex_function_ulps (const char *function_name, FLOAT real_ulp,
|
|||||||
if (real_ulp != 0.0)
|
if (real_ulp != 0.0)
|
||||||
{
|
{
|
||||||
fprintf (ulps_file, "Function: Real part of \"%s\":\n", function_name);
|
fprintf (ulps_file, "Function: Real part of \"%s\":\n", function_name);
|
||||||
fprintf (ulps_file, "%s: % .4" PRINTF_NEXPR "\n",
|
fprintf (ulps_file, "%s: %.0" PRINTF_NEXPR "\n",
|
||||||
CHOOSE("ldouble", "double", "float",
|
CHOOSE("ldouble", "double", "float",
|
||||||
"ildouble", "idouble", "ifloat"), real_ulp);
|
"ildouble", "idouble", "ifloat"),
|
||||||
|
FUNC(ceil) (real_ulp));
|
||||||
}
|
}
|
||||||
if (imag_ulp != 0.0)
|
if (imag_ulp != 0.0)
|
||||||
{
|
{
|
||||||
fprintf (ulps_file, "Function: Imaginary part of \"%s\":\n", function_name);
|
fprintf (ulps_file, "Function: Imaginary part of \"%s\":\n", function_name);
|
||||||
fprintf (ulps_file, "%s: % .4" PRINTF_NEXPR "\n",
|
fprintf (ulps_file, "%s: %.0" PRINTF_NEXPR "\n",
|
||||||
CHOOSE("ldouble", "double", "float",
|
CHOOSE("ldouble", "double", "float",
|
||||||
"ildouble", "idouble", "ifloat"), imag_ulp);
|
"ildouble", "idouble", "ifloat"),
|
||||||
|
FUNC(ceil) (imag_ulp));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -336,8 +340,8 @@ print_max_error (const char *func_name, FLOAT allowed, int xfail)
|
|||||||
if (print_screen_max_error (ok, xfail))
|
if (print_screen_max_error (ok, xfail))
|
||||||
{
|
{
|
||||||
printf ("Maximal error of `%s'\n", func_name);
|
printf ("Maximal error of `%s'\n", func_name);
|
||||||
printf (" is : % .4" PRINTF_NEXPR " ulp\n", max_error);
|
printf (" is : %.0" PRINTF_NEXPR " ulp\n", FUNC(ceil) (max_error));
|
||||||
printf (" accepted: % .4" PRINTF_NEXPR " ulp\n", allowed);
|
printf (" accepted: %.0" PRINTF_NEXPR " ulp\n", FUNC(ceil) (allowed));
|
||||||
}
|
}
|
||||||
|
|
||||||
update_stats (ok, xfail);
|
update_stats (ok, xfail);
|
||||||
@ -350,8 +354,10 @@ print_complex_max_error (const char *func_name, __complex__ FLOAT allowed,
|
|||||||
{
|
{
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
|
|
||||||
if ((real_max_error <= __real__ allowed)
|
if ((real_max_error == 0 && imag_max_error == 0)
|
||||||
&& (imag_max_error <= __imag__ allowed))
|
|| (real_max_error <= __real__ allowed
|
||||||
|
&& imag_max_error <= __imag__ allowed
|
||||||
|
&& !ignore_max_ulp))
|
||||||
{
|
{
|
||||||
ok = 1;
|
ok = 1;
|
||||||
}
|
}
|
||||||
@ -363,11 +369,15 @@ print_complex_max_error (const char *func_name, __complex__ FLOAT allowed,
|
|||||||
if (print_screen_max_error (ok, xfail))
|
if (print_screen_max_error (ok, xfail))
|
||||||
{
|
{
|
||||||
printf ("Maximal error of real part of: %s\n", func_name);
|
printf ("Maximal error of real part of: %s\n", func_name);
|
||||||
printf (" is : % .4" PRINTF_NEXPR " ulp\n", real_max_error);
|
printf (" is : %.0" PRINTF_NEXPR " ulp\n",
|
||||||
printf (" accepted: % .4" PRINTF_NEXPR " ulp\n", __real__ allowed);
|
FUNC(ceil) (real_max_error));
|
||||||
|
printf (" accepted: %.0" PRINTF_NEXPR " ulp\n",
|
||||||
|
FUNC(ceil) (__real__ allowed));
|
||||||
printf ("Maximal error of imaginary part of: %s\n", func_name);
|
printf ("Maximal error of imaginary part of: %s\n", func_name);
|
||||||
printf (" is : % .4" PRINTF_NEXPR " ulp\n", imag_max_error);
|
printf (" is : %.0" PRINTF_NEXPR " ulp\n",
|
||||||
printf (" accepted: % .4" PRINTF_NEXPR " ulp\n", __imag__ allowed);
|
FUNC(ceil) (imag_max_error));
|
||||||
|
printf (" accepted: %.0" PRINTF_NEXPR " ulp\n",
|
||||||
|
FUNC(ceil) (__imag__ allowed));
|
||||||
}
|
}
|
||||||
|
|
||||||
update_stats (ok, xfail);
|
update_stats (ok, xfail);
|
||||||
|
Reference in New Issue
Block a user