-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
converting from symbolic ring to int is broken #9627
Comments
comment:1
Yikes!
Can we just change that to
? |
comment:2
OTOH,
but
OTOH, |
comment:3
Pure Python implements int() of a float as truncating toward zero:
I think in general we've implemented int() on real numbers of various types as truncating toward zero to follow this precedent. |
comment:4
Something like this may work:
Note that OTOH, I won't turn the snippet above into a patch, if somebody likes it and wants to produce a patch, go ahead. |
Reviewer: Burcin Erocal |
comment:7
#12968 has a patch with a positive review which fixes this. We should close this as a duplicate. |
Here is simple example:
Looking a bit deeper into this, it seems that the first 100 bits are correct, and after that int(SR(h)) is just zeroes. (As a side note, the conversion to ZZ works without a problem.)
CC: @katestange @orlitzky
Component: symbolics
Reviewer: Burcin Erocal
Issue created by migration from https://trac.sagemath.org/ticket/9627
The text was updated successfully, but these errors were encountered: