diff options
author | Carlos O'Donell <carlos@redhat.com> | 2013-05-24 14:03:14 -0400 |
---|---|---|
committer | Carlos O'Donell <carlos@redhat.com> | 2013-05-24 14:23:15 -0400 |
commit | e96e37676f0b3dd2a7c42898bbf9aabb90f91d75 (patch) | |
tree | 1a4dbd60415ff53df5fc0930658747df7d614c66 /manual | |
parent | 86bd05fbc8b3a635148f6a7d8b4fb89c9a524e58 (diff) | |
download | glibc-e96e37676f0b3dd2a7c42898bbf9aabb90f91d75.tar glibc-e96e37676f0b3dd2a7c42898bbf9aabb90f91d75.tar.gz glibc-e96e37676f0b3dd2a7c42898bbf9aabb90f91d75.tar.bz2 glibc-e96e37676f0b3dd2a7c42898bbf9aabb90f91d75.zip |
Correctly compute ulp near zero.
The current value used for ulp near zero is wrong,
and this commit fixes it such that ulp(0) is the smallest
subnormal value nearest to zero, which makes the most
sense for testing values near zero. Note that this is not
what Java does; they use the nearest normal value, which
is less accurate than what we want for glibc. Note that
there is no correct implementation of ulp since there
is no strict mathmatical definition that is accepted by
all groups using IEEE 754.
Previously with the large ulp values near zero there
were tests that previously passed, but were in fact
billions of ulp away from the precise answer. With this
commit we now need to disable one of the cpow tests which
is revealed to be inaccurate (bug 14473).
---
2013-05-24 Carlos O'Donell <carlos@redhat.com>
* math/libm-test.inc (MAX_EXP): Define.
(ULPDIFF): Define.
(ulp): New function.
(check_float_internal): Use ULPDIFF.
(cpow_test): Disable failing test.
(check_ulp): Test ulp() implemetnation.
(main): Call check_ulp before starting tests.
Diffstat (limited to 'manual')
0 files changed, 0 insertions, 0 deletions