This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/17834] New: [ldbl-96] scalblnl incorrect for subnormal arguments
- From: "jsm28 at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 12 Jan 2015 21:42:38 +0000
- Subject: [Bug math/17834] New: [ldbl-96] scalblnl incorrect for subnormal arguments
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17834
Bug ID: 17834
Summary: [ldbl-96] scalblnl incorrect for subnormal arguments
Product: glibc
Version: 2.21
Status: NEW
Severity: normal
Priority: P2
Component: math
Assignee: unassigned at sourceware dot org
Reporter: jsm28 at gcc dot gnu.org
The ldbl-96 implementation of scalblnl (used for x86_64 and ia64) is incorrect
for subnormal arguments (this is a separate bug from bug 17803, which is about
underflowing results). There are two problems with the adjustments of
subnormal arguments: the "two63" variable multiplied by is actually 0x1p52L not
0x1p63L, so is insufficient to make values normal, and then
GET_LDOUBLE_EXP(es,x), used to extract the new exponent, extracts it into a
variable that isn't used, while the value taken to by the new exponent is
wrongly taken from the high part of the mantissa before the adjustment (hx).
Thus, for example, scalblnl (0x1p-16383L, 0) returns 0 with underflow, and
scalblnl (0x1.ffffp-16383L, 0) returns 0xf.fff8p-65.
--
You are receiving this mail because:
You are on the CC list for the bug.