-
Notifications
You must be signed in to change notification settings - Fork 41
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
Work-around that CyPari2 has removed prec_words_to_dec #124
Comments
Maybe this problem is going to vanish. With Sage 10.5beta8 I am seeing no errors when importing the precision converters:
I think that may mean that those functions have been restored in CyPari2, presumably for compatibility reasons. |
What version of |
It comes with CyPari 2.2.0 and Pari 2.15.4. There has been a lot of activity at CyPari2 related to precision issues with Pari 2.17. So I would guess that it does indeed have to do with the version of Pari. |
Maybe the workaround, for now, is to use CyPari2 from Sage rather than installing the bleeding edge on top of Sage's version. |
I tried the official |
The report came from a user of the Arch Linux distro, which does rolling releases and currently has Pari 2.17. |
I looked at the cypari2 github site, and as far as I can tell, they have not removed prec_words_to_dec. They did make several changes to accommodate pari 2.17, but those changes did not include removing that function from the pari_instance module. On the other hand, this page indicates that the Arch linux pari package is using Pari 2.17. I suspect that when Arch switched to pari 2.17 the maintainer of the Arch Sage package was forced to do his own adaptation of cypari2 to pari 2.17, and he chose to delete pari_words_to_dec and thereby break SnapPy in Arch sage 10.4. So it is not clear to me what we should do. We could modify SnapPy to avoid using prec_words_to_dec now. That would accommodate a random choice made by the Arch maintainer. But after cypari2 does its next release, and after sage incorporates that release into sage, the current SnapPy code will work again. So the change is not necessary, except for the purpose of making snappy work on one release of sage for one linux distro which happened to make an incompatible change to the cypari2 package. I think that may mean that we should do nothing. |
@culler Unfortunately, I believe this cypari2 PR to support Pari 2.17 will remove |
They are open to keeping |
I think we should just implement a replacement for prec_words_to_dec as a
function defined within SnapPy. SnapPy no longer supports 32 bit
platforms, which means that we know that a Pari word is 64 bits on any
machine which could run SnapPy. So it is trivial to compute the base 10
precision from the base 2^64 precision, which in turn is equal to
gen.wordsize() - 2 for a gen of type T_REAL or T_COMPLEX.
- Marc
…On Sun, Nov 10, 2024 at 5:53 PM Nathan Dunfield ***@***.***> wrote:
They are open to keeping prec_words_to_dec and friends, at least for Pari
2.15, but it's not clear whether they would work for Pari 2.17. It looks
like we use these three times in submodules of verify, a few times in
number, and also in snap.shapes. Thoughts? Also, tagging @unhyperbolic
<https://github.com/unhyperbolic> as the author of verify.
—
Reply to this email directly, view it on GitHub
<#124 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ6CP7JAKNEFVZONY4H3UDZ77WXLAVCNFSM6AAAAABREOAZ3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRWHE4TGNZTG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Maybe There's also |
I think this is fixed in my latest commit. To test, I used %pip to install cypari2-2.2.1 in SageMath-10.5. Then I installed SnapPy from the current tip of our repo in SageMath-10.5. Then this is what I see:
|
Please see my comment 7f0bac4#r150980881 |
Also, I think for a little while there was a cypari 2.2.1 in pypi with this function removed, but the function was restored (with a deprecated warning). |
Here "this function" refers to |
I meant |
I checked that the commit aae6a46 works on Arch Linux, which already has PARI 2.17 and no |
With the newest version 2.2.0 of
cypari2
importingsnappy
results in the below error. It seems that CyPari2 has removedprec_words_to_dec
. SnapPy uses that function to estimate how many digits of the decimal representation of a volume are correct. Only when running in Sage does SnapPy use CyPari2 (otherwise it uses CyPari). This only affects people using SnapPy in the not-yet released Sage 10.5.The text was updated successfully, but these errors were encountered: