[Issue 23845] New: std.math.traits.copysign returns the wrong value
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Apr 19 08:48:48 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23845
Issue ID: 23845
Summary: std.math.traits.copysign returns the wrong value
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: grylliade at hotmail.com
As written, the function simply returns its first parameter. Should likely
return cast(R) *pto, though my pointer syntax is rusty—surely doing all that
work with pto should have *some* point (no pun intended).
I’d honestly bump this up to critical, but if no one’s noticed this yet, maybe
it shouldn’t be—except copysign() can be called from cbrt(), at the very least.
It keeps cbrt() from being inferred pure on the MS runtime, I think; if I’m
wrong, that’s a separate bug.
--
More information about the Digitalmars-d-bugs
mailing list