[BZ #2549]
2006-04-14 H.J. Lu <hongjiu.lu@intel.com> [BZ #2549] * math/libm-test.inc (check_float_internal): Support denormalized return.
This commit is contained in:
parent
ad3371fbac
commit
e6b29af8a3
@ -1,3 +1,9 @@
|
|||||||
|
2006-04-14 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
[BZ #2549]
|
||||||
|
* math/libm-test.inc (check_float_internal): Support
|
||||||
|
denormalized return.
|
||||||
|
|
||||||
2007-10-23 Andreas Jaeger <aj@suse.de>
|
2007-10-23 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
[BZ #5208]
|
[BZ #5208]
|
||||||
|
@ -487,11 +487,24 @@ check_float_internal (const char *test_name, FLOAT computed, FLOAT expected,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
diff = FUNC(fabs) (computed - expected);
|
diff = FUNC(fabs) (computed - expected);
|
||||||
|
switch (fpclassify (expected))
|
||||||
|
{
|
||||||
|
case FP_ZERO:
|
||||||
/* ilogb (0) isn't allowed. */
|
/* ilogb (0) isn't allowed. */
|
||||||
if (expected == 0.0)
|
|
||||||
ulp = diff / FUNC(ldexp) (1.0, - MANT_DIG);
|
ulp = diff / FUNC(ldexp) (1.0, - MANT_DIG);
|
||||||
else
|
break;
|
||||||
|
case FP_NORMAL:
|
||||||
ulp = diff / FUNC(ldexp) (1.0, FUNC(ilogb) (expected) - MANT_DIG);
|
ulp = diff / FUNC(ldexp) (1.0, FUNC(ilogb) (expected) - MANT_DIG);
|
||||||
|
break;
|
||||||
|
case FP_SUBNORMAL:
|
||||||
|
ulp = (FUNC(ldexp) (diff, MANT_DIG)
|
||||||
|
/ FUNC(ldexp) (1.0, FUNC(ilogb) (expected)));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
/* It should never happen. */
|
||||||
|
abort ();
|
||||||
|
break;
|
||||||
|
}
|
||||||
set_max_error (ulp, curr_max_error);
|
set_max_error (ulp, curr_max_error);
|
||||||
print_diff = 1;
|
print_diff = 1;
|
||||||
if ((exceptions & IGNORE_ZERO_INF_SIGN) == 0
|
if ((exceptions & IGNORE_ZERO_INF_SIGN) == 0
|
||||||
|
Loading…
Reference in New Issue
Block a user