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
Bug in sqrt in QQbar #20064
Comments
comment:1
(Extracted from #18836 comment 9)
|
comment:2
Surely it is simplest to implement arg for RIF elements, returning 0 or Pi depending on sign provided that the interval has constant sign, and raising an error otherwise? |
comment:3
Replying to @JohnCremona:
I would regard that as a "change in design/API", though. I think our real fields currently quite consistently do not have an "argument" method:
Your proposal is in line with the solution taken in #18337 (to put "real" and "imag" on RIF) so perhaps putting "argument" there is the simplest solution. From an efficiency point of view: I'm not sure how hard we'd be hitting the coercion system by mixing RIF and CIF elements. |
Branch: u/nbruin/bug_in_sqrt_in_qqbar |
New commits:
|
Author: Nils Bruin |
Commit: |
comment:6
This looks good to me. I have checked that it deals with the original problems I had at #18836, so I am going to set this to positive_review, make that ticket depend on this and set that one to needs_review. |
Reviewer: John Cremona |
Changed branch from u/nbruin/bug_in_sqrt_in_qqbar to |
See #18836. This bug is holding up that (and also #20028). The following code creates an elemnt d of QQbar and tries to do d.sqrt(). It fails unless you call d.imag().is_zero() first.
Component: numerical
Author: Nils Bruin
Branch/Commit:
48c12ef
Reviewer: John Cremona
Issue created by migration from https://trac.sagemath.org/ticket/20064
The text was updated successfully, but these errors were encountered: