#13014: lcm for SR rationals
----------------------------------+-----------------------------------------
       Reporter:  dsm             |         Owner:  AlexGhitza              
           Type:  enhancement     |        Status:  closed                  
       Priority:  minor           |     Milestone:  sage-5.2                
      Component:  symbolics       |    Resolution:  fixed                   
       Keywords:  sd40.5          |   Work issues:                          
Report Upstream:  N/A             |     Reviewers:  Dan Drake, William Stein
        Authors:  Douglas McNeil  |     Merged in:  sage-5.2.beta0          
   Dependencies:                  |      Stopgaps:                          
----------------------------------+-----------------------------------------

Comment (by dsm):

 I think it should probably come out entirely.  What seems to be going on
 is that gcd is getting called during evaluation on a lot of floats, e.g.

 {{{

 sage: f = lambda t: 1/(t+pi)
 sage: f(1.5r)
 GCDing 1 <type 'int'> 1 0 <type 'int'> 0
 returning on ZZ 1
 GCDing 1.5 <type 'float'> 1.5 1.0 <type 'float'> 1.0
 returning on QQ 1/2
 GCDing 3.0 <type 'float'> 3.0 2.0 <type 'float'> 2.0
 returning on ZZ 1
 }}}

 Previously, only integers would be tried, and they would typically (though
 not always!)  fail.  Floats, however, can be coerced to QQ.. and so they
 are.  Sage is implicitly relying on the fact that gcd will fail, and fail
 quickly, for floats.  I can recover the original runtimes by adding more
 explicit typechecks but that isn't very robust.

 Far and away the simplest thing is to revert it, more's the pity.  On the
 bright side I probably exercise this code more than anyone else and even I
 don't use it very much.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13014#comment:23>
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.

Reply via email to