[Issue 20396] New: format!"%a" leeds to wrong result for denormalized float
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 15 20:01:55 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20396
Issue ID: 20396
Summary: format!"%a" leeds to wrong result for denormalized
float
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: bugzilla at d-ecke.de
void main()
{
import std.stdio;
import std.math;
writefln!"%a"(nextUp(0.0f));
writefln!"%a"(nextUp(0.0));
}
Leeds on my computer to
0x1p-149
0x0.0000000000001p-1022
The first one should be 0x0.000002p-126. The second one shows, that doubles
work correctly (and reals work on my computer too).
This bug is located inside C's snprintf.
--
More information about the Digitalmars-d-bugs
mailing list