#9540: Testing whether a Gaussian integer is in ZZ is extremely slow
---------------------------------+------------------------------------------
Reporter: fredrik.johansson | Owner: AlexGhitza
Type: defect | Status: new
Priority: major | Milestone:
Component: basic arithmetic | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
---------------------------------+------------------------------------------
{{{
sage: x = 5
sage: y = 3/5
sage: z = (5+I).pyobject()
sage: z.parent()
Number Field in I with defining polynomial x^2 + 1
sage: %timeit x in ZZ
625 loops, best of 3: 103 ns per loop
sage: %timeit y in ZZ
625 loops, best of 3: 7.19 µs per loop
sage: %timeit z in ZZ
625 loops, best of 3: 381 µs per loop
}}}
By extension, this massively affects performance of the ._is_integer()
method for symbolic expressions containing complex numbers.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9540>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.