#9953: int(symbolic expr) off by 1
-------------------------+--------------------------------------------------
   Reporter:  schilly    |       Owner:  burcin    
       Type:  defect     |      Status:  needs_work
   Priority:  critical   |   Milestone:  sage-4.6.2
  Component:  symbolics  |    Keywords:            
     Author:             |    Upstream:  N/A       
   Reviewer:             |      Merged:            
Work_issues:             |  
-------------------------+--------------------------------------------------

Comment(by dsm):

 The current patch won't work for 0 or negative numbers (the log2 breaks).
 This can be easily fixed, but dealing with cases like

 {{{
 sage: f = 1-1/10**100
 sage: int(f)
 0
 sage: int(SR(f))
 1
 }}}

 where the precision needed to get the right result isn't a function of the
 size is a little trickier.  Maybe fast-path the common cases and then fall
 back on the existing floor/ceil logic?

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