www.fgks.org   »   [go: up one dir, main page]

Issue 21834 - std.numeric.gcd can't handle negative values
Summary: std.numeric.gcd can't handle negative values
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2021-04-16 23:34 UTC by Iain Buclaw
Modified: 2021-04-17 18:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Iain Buclaw 2021-04-16 23:34:32 UTC
void main()
{
    import std.numeric;
    assert(gcd(-42, 21) == 21);
}

Worse still, gdc and ldc both hang.
Comment 1 Dlang Bot 2021-04-17 00:00:06 UTC
@ibuclaw created dlang/phobos pull request #7974 "fix Issue 21834 - std.numeric.gcd can't handle negative values" fixing this issue:

- fix Issue 21834 - std.numeric.gcd can't handle negative values

https://github.com/dlang/phobos/pull/7974
Comment 2 Dlang Bot 2021-04-17 18:04:55 UTC
dlang/phobos pull request #7974 "fix Issue 21834 - std.numeric.gcd can't handle negative values" was merged into master:

- b7a1f34e3c0c2c177e7a22fe515968adc6d54055 by Iain Buclaw:
  fix Issue 21834 - std.numeric.gcd can't handle negative values

https://github.com/dlang/phobos/pull/7974