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
real
and imag
of complex
should return float
#15032
Comments
comment:1
Patchbot apply trac15032.2.patch |
comment:2
The new functions needs some doctests to check that the type is correct. I am actually quite surprised by the inconsistency of the Sage implementation.
EDIT Actually just shift the doctests to within the |
comment:3
Okay, I'll add the tests. I think the reason for the functions is that it's converting from MPFR. It could be changed with the |
Attachment: trac15032.3.patch.gz |
comment:4
I added the tests to |
comment:5
Looks good to me. All tests pass in sage/rings and sage/functions Patchbot apply trac15032.3.patch |
Author: Eviatar Bach |
Reviewer: Punarbasu Purkayastha |
Merged: sage-5.12.beta3 |
real(z)
andimag(z)
, wherez
iscomplex
, as of now returns acomplex
. It should return afloat
, since that makes it consistent withreal(CC(3, 4))
, for example. It also fixes problems with plotting the real or imaginary parts of complex functions.Component: symbolics
Author: Eviatar Bach
Reviewer: Punarbasu Purkayastha
Merged: sage-5.12.beta3
Issue created by migration from https://trac.sagemath.org/ticket/15032
The text was updated successfully, but these errors were encountered: