New issue
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
reproducible test failure in master: iroot() requires 'mpz','int' arguments #18374
Comments
I can reproduce this. I have gmpy2 installed. It looks like evalf isn't tested in the optional dependency tests so I guess it isn't tested with gmpy2: Line 136 in f5413ff
I think it's maybe a bug in gmpy2 since it only happens for large integers: >>> import gmpy2 as gmpy
>>> gmpy.iroot(4, 2)
(mpz(2), True)
>>> gmpy.iroot(4, 200000000000)
(mpz(1), False)
>>> gmpy.iroot(4, 20000000000000)
(mpz(1), False)
>>> gmpy.iroot(4, 2000000000000000)
(mpz(1), False)
>>> gmpy.iroot(4, 200000000000000000)
(mpz(1), False)
>>> gmpy.iroot(4, 200000000000000000000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: iroot() requires 'mpz','int' arguments The cutoff seems to be >>> gmpy.iroot(4, 2**63)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: iroot() requires 'mpz','int' arguments
>>> gmpy.iroot(4, 2**63-1)
(mpz(1), False) Converting to >>> gmpy.iroot(gmpy.mpz(4), gmpy.mpz(2**63))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: iroot() requires 'mpz','int' arguments Testing with gmpy (version 1, rather than gmpy2) I find that there is no iroot function and there are loads of test failures:
I guess that there are three issues here:
|
I also found that we must check that the argument must be less than
for gmpy2
Therefore for |
I tried to fix it in the PR and now it passed the test locally |
We might have to add the whole test suite to the optional dependency build as we include gmpy in more of the core. |
I have added the test suite of the core to optional dependency. |
I have opened an issue in gmpy2 related to this sympy issue here. |
Update on gmpy issue(comment). |
This is still broken in 32 bit, since ULONG_MAX is
Note that in 64 bit gmpy2.iroot works ok up to Maybe the simplest fix is to just try
Alternatively, use Edit: this was already broken in 1.9, but in 1.10 this gives failures in the testsuite. |
I now have a 100% reproducible local test failure with master:
I suppose this has been introduced by #18276.
Ping @Smit-create @asmeurer
The text was updated successfully, but these errors were encountered: