Bug 22984 – Wrong results for complex abs

Status
RESOLVED
Resolution
DUPLICATE
Severity
major
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-04-04T11:21:22Z
Last change time
2022-04-04T19:59:13Z
Assigned to
No Owner
Creator
ponce

Comments

Comment #0 by aliloko — 2022-04-04T11:21:22Z
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
Comment #1 by aliloko — 2022-04-04T19:59:13Z
*** This issue has been marked as a duplicate of issue 22983 ***