Bug 2550

Summary: Incorrect return from float nexttoward (-0X1.3P-145, -0XAP-148)
Product: glibc Reporter: H.J. Lu <hjl.tools>
Component: mathAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: drepper.fsp, glibc-bugs
Priority: P2 Flags: fweimer: security-
Version: unspecified   
Target Milestone: ---   
Host: x86_64-unknown-linux-gnu Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu Last reconfirmed:

Description H.J. Lu 2006-04-12 22:27:46 UTC
Failure: Test: nexttoward (-0X1.3P-145, -0XAP-148) == -0X1.4P-145
Result:
 is:         -2.52233723578467072766e-44  -0x1.20000000000000000000p-145
 should be:  -2.80259692864963414185e-44  -0x1.40000000000000000000p-145
 difference:  2.80259692864963414185e-45   0x1.00000000000000000000p-148
 ulp       :  inf
 max.ulp   :  0.0000
Comment 1 H.J. Lu 2006-04-13 22:26:56 UTC
sysdeps/i386/fpu/s_nexttowardf.c doesn't handle denormalized numbers correctly.
Comment 2 Ulrich Drepper 2006-04-23 17:52:34 UTC
Suspended until somebody comes up with a patch.
Comment 3 Joseph Myers 2012-02-23 02:37:16 UTC
Confirmed valid and still present (tested x86_64).
Comment 4 Joseph Myers 2012-05-01 15:39:28 UTC
Fixed by:

commit 7cb029ee6ec74801aebe41af62d20a44775d0697
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue May 1 15:37:43 2012 +0000

    Fix nexttoward bugs (bugs 2550, 2570).