Skip to content

Conversation

@charris
Copy link
Member

@charris charris commented Jul 29, 2019

Backport of #14121 .

gcd/lcm was added in 7ab0f15

I believe it was an oversight to not add the function definitions to npy_math.h, which resulted in an implicit function declaration for me which means the result of gcd is truncated to 32 bits (which is correct for the vast majority of results) but not all.

Luckily the gcd_overflow test caught this. Unfortantely I had -w on and didn't see the -Wimplicit-function-declaration error and the test case result is 2^64 which was truncated to 0 so it took quite a bit of my time to debug.

I'm not sure if this should be labelled BLD, ENH, or MAINT.
I'm also not sure where in the file you'd like these sorted.

@charris charris added this to the 1.17.1 release milestone Jul 29, 2019
@charris charris merged commit 968bf13 into numpy:maintenance/1.17.x Jul 29, 2019
@charris charris deleted the backport-14121 branch July 29, 2019 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants