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
CC -> PARI: return t_REAL for real numbers #15888
Comments
Branch: u/jdemeyer/ticket/15888 |
New commits:
|
Commit: |
comment:3
It would seem to make sense to treat purely imaginary numbers similarly, by setting the real component to the
|
Reviewer: Peter Bruin |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:7
There are a few doctest failures:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Changed branch from u/jdemeyer/ticket/15888 to |
When converting Sage complex numbers to PARI, we should return a PARI
t_REAL
if the original number was actually real. This fixes a problem withellwp()
in #15767. In PARI's floating point model, the number1e-19 + 0.0*I
has less precision than the real1e-19
.It is also consistent with the PARI philosophy of returning simplified types (examples:
(1.1*I)^2
andellj(1.1*I)
in PARI gives real numbers).CC: @pjbruin
Component: interfaces
Author: Jeroen Demeyer
Branch/Commit:
7067299
Reviewer: Peter Bruin
Issue created by migration from https://trac.sagemath.org/ticket/15888
The text was updated successfully, but these errors were encountered: