-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Adapt to precision changes in pari 2.17 #166
base: master
Are you sure you want to change the base?
Conversation
Since 2.17 pari stores the precision in bits instead of words. Port cypari2 to work with it: - Rename prec_bits_to_words to prec_bits_to_pari and outsource it to upstream's nbits2prec, so it works with all pari versions - Remove unused and no longer needed prec_words_to_bits and prec_words_to_dec functions - Use upstream's LOWDEFAULTPREC as default precision
there are doctest failures like this. https://github.com/sagemath/cypari2/actions/runs/11186104097/job/31100414929#step:5:322
it's probably hard to avoid differentiating between pari versions up to 2.15 and 2.17+ in this test. |
That was actally an issue with my code, this test should always return 64. |
Tests seem fine now. However, I'm seeing a weird issue that I don't understand. With this patch, in sage I get
which shows that the The issue doesn't happen without this patch (but of course lots of precision related stuff is broken). Any idea what's going on here? Why should these changes affect |
Could it be a |
Ah, found the issue.
which of course fails to properly import |
Since 2.17 pari stores the precision in bits instead of words. Port cypari2 to work with it:
prec_bits_to_words
toprec_bits_to_pari
and outsource it to upstream's nbits2prec, so it works with all pari versionsprec_words_to_bits
,prec_dec_to_words
andprec_words_to_dec
functionsLOWDEFAULTPREC
as default precision