https://issues.dlang.org/show_bug.cgi?id=21834
Issue ID: 21834
Summary: std.numeric.gcd can't handle negative values
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
void main()
{
import std.numeric;
assert(gcd(-42, 21) == 21);
}
Worse still, gdc and ldc both hang.
--
