-
-
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
operations between sage and gmpy2 numbers #23052
Comments
This comment has been minimized.
This comment has been minimized.
Replying to @vinklein:
This makes no sense to me. What does it mean to provide coercion for certain operations only? |
This comment has been minimized.
This comment has been minimized.
comment:3
You're right, description updated |
Changed dependencies from 22928 to #22928 |
comment:4
Thanks for the clarification. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:7
I don't think that this feature is desirable. The behavior should be the same as with
Mixing
|
comment:8
To make this work, one has to modify the various binary operators in |
comment:9
Replying to @videlec:
This is obviously the right thing to do. Given that
works, it's actually strange that
doesn't work. |
comment:10
Let me update the ticket description then. |
Upstream: Not yet reported upstream; Will do shortly. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Changed upstream from Not yet reported upstream; Will do shortly. to Reported upstream. No feedback yet. |
Changed upstream from Reported upstream. No feedback yet. to Fixed upstream, in a later stable release. |
comment:14
The gmpy2 pull request #217 has been merged this morning. Should we make a patch based on this or wait for the next gmpy2 release ? |
comment:21
You create a lot of warnings with the macros. This should be fixed.
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:23
Warnings fixed. |
comment:24
some failures...
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:26
function |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:29
Patch renamed and links added. |
Reviewer: Vincent Delecroix |
Changed branch from u/vklein/23052 to |
Currently, operations involving Sage and gmpy2 numbers are broken (see [comment:7]). Though, it works fine with gmpy2 and Python numbers. The reason is that the various binary operations implemented in gmpy2 just check for Python integer types. It should be possible to modify these functions in order that an operation involving a gmpy2 number and a type implementing one of the
__mpz__
/__mpq__
/__mpfr__
/__mpc__
method should work.Note: #22928 implemented the conversion Sage type -> gmpy2 type via the implementation of the
__mpz__
,__mpq__
,__mpfr__
and__mpc__
methods.Upstream issue: aleaxit/gmpy#214
Upstream: Fixed upstream, in a later stable release.
CC: @videlec @jdemeyer
Component: packages: standard
Author: Vincent Klein
Branch/Commit:
b7fbb9a
Reviewer: Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/23052
The text was updated successfully, but these errors were encountered: