[Issue 22984] New: Wrong results for complex abs
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 4 11:21:22 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22984
Issue ID: 22984
Summary: Wrong results for complex abs
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: aliloko at gmail.com
Consider the following program:
import std.complex;
import std.stdio;
void main()
{
Complex!float x = -5.016558e-20;
writeln(x);
writeln(x.abs);
}
DMD outputs the following:
-5.01656e-20+0i
6.2102e+07
--
More information about the Digitalmars-d-bugs
mailing list