#19825: Better comparison and conversion code for UCF
--------------------------------------+----------------------------
       Reporter:  vdelecroix          |        Owner:
           Type:  enhancement         |       Status:  needs_review
       Priority:  major               |    Milestone:  sage-7.0
      Component:  number fields       |   Resolution:
       Keywords:                      |    Merged in:
        Authors:  Vincent Delecroix   |    Reviewers:
Report Upstream:  N/A                 |  Work issues:
         Branch:  u/vdelecroix/19825  |       Commit:
   Dependencies:                      |     Stopgaps:
--------------------------------------+----------------------------
Changes (by vdelecroix):

 * status:  new => needs_review
 * branch:   => u/vdelecroix/19825


Old description:

> We fasten the comparison code and fix the following for the Universal
> cyclotomic field:
> {{{
> sage: CIF(E(3))
> Traceback (most recent call last):
> ...
> TypeError: unable to coerce to a ComplexIntervalFieldElement
> }}}

New description:

 We fasten the comparison code and fix the following for the Universal
 cyclotomic field:
 {{{
 sage: CIF(E(3))
 Traceback (most recent call last):
 ...
 TypeError: unable to coerce to a ComplexIntervalFieldElement
 }}}

 Before
 {{{
 sage: %timeit cmp(E(3), E(5))
 1000 loops, best of 3: 1.4 ms per loop
 sage: %timeit cmp(E(3)+E(3)**2, E(5)+E(5)**2)
 1000 loops, best of 3: 975 µs per loop
 }}}
 After
 {{{
 sage: %timeit cmp(E(3), E(5))
 1000 loops, best of 3: 241 µs per loop
 sage: %timeit cmp(E(3)+E(3)**2, E(5)+E(5)**2)
 1000 loops, best of 3: 181 µs per loop
 }}}

--

--
Ticket URL: <http://trac.sagemath.org/ticket/19825#comment:1>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to