We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GCG::getGCD() uses is_int() to check if a number is an integer, but this function returns false if this number is greater than PHP_INT_MAX.
The text was updated successfully, but these errors were encountered:
I'm reopening this issue, as the modulo (%) operator is casting its operands to integers, which may cause overflow if operands are > PHP_INT_MAX.
Example on a 32 bit machine, where PHP_INT_MAX = 2147483647 :
16748050000 % 1148700 =-1056684 ! (the proper result is 4000)
Using fmod() (floating point modulo) is not a proper solution, as floating point may cause a lost of precision on large numbers.
Sorry, something went wrong.
No branches or pull requests
GCG::getGCD() uses is_int() to check if a number is an integer, but this function returns false if this number is greater than PHP_INT_MAX.
The text was updated successfully, but these errors were encountered: