#10221: problem in rounding (RealField)
--------------------------------+-------------------------------------------
   Reporter:  zimmerma          |       Owner:  AlexGhitza
       Type:  defect            |      Status:  new       
   Priority:  minor             |   Milestone:  sage-4.6.1
  Component:  basic arithmetic  |    Keywords:            
     Author:                    |    Upstream:  N/A       
   Reviewer:                    |      Merged:            
Work_issues:                    |  
--------------------------------+-------------------------------------------
 Consider the following with Sage 4.4.4:
 {{{
 sage: RD = RealField(53, rnd='RNDD')
 sage: RU = RealField(53, rnd='RNDU')
 sage: a=RD(1/3)
 sage: RU(1/a)
 3.00000000000000
 sage: RU(1/a.exact_rational())
 3.00000000000001
 }}}
 I would expect both results to be equal, since a is exactly representable
 in 53-bit precision. However it seems in {{{RU(1/a)}}}
 that {{{1/a}}} is evaluated with rounding down, whereas I would
 expect it evaluated with rounding up.

 Maybe {{{1/a}}} is first evaluated before {{{RU}}} is called on it?

 Paul

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10221>
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