675 – %a format has an out-by-1 bug for denormals.

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 675 - %a format has an out-by-1 bug for denormals.
Summary: %a format has an out-by-1 bug for denormals.
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 normal
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2006年12月11日 08:00 UTC by Don
Modified: 2014年02月15日 13:18 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Don 2006年12月11日 08:00:02 UTC
I think this is a bug in the DMC library. It also affects the D name-mangling of template float arguments.
void main()
{
 printf("%La %La\n", 0x1p-16382L, 0x1p-16383L);
}
prints:
-----------
0x1p-16382 0x1p-16384
------------
Comment 1 Don 2009年02月25日 02:58:08 UTC
If x is denormal, the %La format always prints the exponent higher by 1, than the correct value. The mantissa is always correct.
Comment 2 Don 2009年02月27日 07:36:21 UTC
I thought the problem might have been in frexpl(), but it isn't -- I can confirm that frexpl works correctly. The bug must be in __pfloatfmt somewhere.
Comment 3 Don 2009年04月21日 09:21:05 UTC
Fixed 2.029.


AltStyle によって変換されたページ (->オリジナル) /