-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
is_real method should exist for elements of AA, ZZ, QQ,..., and be fixed where it is already defined #16436
Comments
comment:1
Hi Sebastien. Note that you can also use coercion with the poorest real representation:
though you need to be careful with
|
This comment has been minimized.
This comment has been minimized.
comment:3
Replying to @sagetrac-tmonteil:
I have been using monkey tricks like that for too long now like
|
This comment has been minimized.
This comment has been minimized.
comment:5
If, as i proposed on sage-devel we could have an overlay (say, |
This comment has been minimized.
This comment has been minimized.
comment:8
Replying to @sagetrac-tmonteil:
See #12967 and #17984 for why |
comment:9
One clean way to implement
One could handle |
The function
is_real
is useful but it is not practical because it it not implemented for every types of numbers in Sage. And I do not want to do type checking before being able to use it in my code.I am sure I forget some other rings...
We need more of this kind of consistency in Sage.
is_imaginary
is another example.The
.is_real()
method does not handleNaN
and+/-Infinity
correctly, for example:Component: algebra
Issue created by migration from https://trac.sagemath.org/ticket/16436
The text was updated successfully, but these errors were encountered: