mirror of
git://sourceware.org/git/glibc.git
synced 2025-01-18 12:16:13 +08:00
* math/test-misc.c (main): Add tests for rounding long double
values close to smallest double denormalized value to double. * soft-fp/op-common.h (FP_TRUNC): Correct off-by-one error in condition for truncating to 0. Set sticky bit for such truncation. 2007-05-03 Jakub Jelinek <jakub@redhat.com> * math/test-misc.c (main): Add tests for rounding long double values close to smallest double denormalized value to double. 2007-04-30 Joseph Myers <joseph@codesourcery.com> * soft-fp/op-common.h (FP_TRUNC): Correct off-by-one error in condition for truncating to 0. Set sticky bit for such truncation.
This commit is contained in:
parent
57433edee3
commit
002f0b0b5d
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
2007-05-03 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* math/test-misc.c (main): Add tests for rounding long double
|
||||||
|
values close to smallest double denormalized value to double.
|
||||||
|
|
||||||
|
2007-04-30 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* soft-fp/op-common.h (FP_TRUNC): Correct off-by-one error in
|
||||||
|
condition for truncating to 0. Set sticky bit for such
|
||||||
|
truncation.
|
||||||
|
|
||||||
2007-05-02 Jakub Jelinek <jakub@redhat.com>
|
2007-05-02 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* stdio-common/vfprintf.c (process_string_arg): Use a VLA rather than
|
* stdio-common/vfprintf.c (process_string_arg): Use a VLA rather than
|
||||||
|
@ -1235,5 +1235,22 @@ main (void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined NO_LONG_DOUBLE && LDBL_MANT_DIG >= DBL_MANT_DIG + 4
|
||||||
|
volatile long double ld5 = nextafter (0.0, 1.0) / 16.0L;
|
||||||
|
volatile double d5;
|
||||||
|
(void) &ld5;
|
||||||
|
int i;
|
||||||
|
for (i = 0; i <= 32; i++)
|
||||||
|
{
|
||||||
|
d5 = ld5 * i;
|
||||||
|
(void) &d5;
|
||||||
|
if (d5 != (i <= 8 ? 0 : i < 24 ? 1 : 2) * nextafter (0.0, 1.0))
|
||||||
|
{
|
||||||
|
printf ("%La incorrectly rounded to %a\n", ld5 * i, d5);
|
||||||
|
result = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -1211,8 +1211,11 @@ do { \
|
|||||||
{ \
|
{ \
|
||||||
if (D##_e <= 0) \
|
if (D##_e <= 0) \
|
||||||
{ \
|
{ \
|
||||||
if (D##_e <= 1 - _FP_FRACBITS_##dfs) \
|
if (D##_e < 1 - _FP_FRACBITS_##dfs) \
|
||||||
_FP_FRAC_SET_##swc(S, _FP_ZEROFRAC_##swc); \
|
{ \
|
||||||
|
_FP_FRAC_SET_##swc(S, _FP_ZEROFRAC_##swc); \
|
||||||
|
_FP_FRAC_LOW_##swc(S) |= 1; \
|
||||||
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
_FP_FRAC_HIGH_##sfs(S) |= _FP_IMPLBIT_SH_##sfs; \
|
_FP_FRAC_HIGH_##sfs(S) |= _FP_IMPLBIT_SH_##sfs; \
|
||||||
|
Loading…
Reference in New Issue
Block a user