Bug 2557 - Incorrect return from double scalbln (-0X1.5555555555556P-2, 4294966274)
Summary: Incorrect return from double scalbln (-0X1.5555555555556P-2, 4294966274)
Status: RESOLVED INVALID
Alias: None
Product: glibc
Classification: Unclassified
Component: math (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Andreas Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-12 22:37 UTC by H.J. Lu
Modified: 2019-04-10 09:15 UTC (History)
2 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2006-04-12 22:37:32 UTC
Failure: Test: scalbln (-0X1.5555555555556P-2, 4294966274) ==
-0X0.5555555555556P-1022
Result:
 is:         -inf  -inf
 should be:  -7.41691286169067457074e-309  -0x0.55555555555560000000p-1022
Comment 1 Ulrich Drepper 2006-04-23 17:53:57 UTC
Suspended until somebody comes up with a patch.
Comment 2 Joseph Myers 2012-02-19 17:56:47 UTC
scalbln takes a "long" second argument, which on x86_64 is a signed 64-bit value.  When that is 4294966274, a large positive value, a result of -inf as reported here is the correct result.  If you pass (int)4294966274, a negative value, then you do get -0X0.5555555555556P-1022 as expected.  So there is no bug here.