Dirk wrote:
> I do not understand the behaviour below.
> 
> sage: x=RIF(3+10/71,3+1/7)
> sage: x
> 3.15?
> sage: x.str(style='brackets')
> '[3.1408450704225350 .. 3.1428571428571433]'
> 
> Both endpoints start with 3.14, both endpoints round to 3.14.
> Surely the display should rather be '3.14?'.
> 


Have you read the documentation for this?  The documentation is very 
verbose (which is a good thing).  It says:

When there are two possible results of equal precision and with the same 
error width, then we pick the one which is farther from zero. (For 
instance, RIF(0, 123) with two error digits could print as 61.?62 or 
62.?62. We prefer the latter because it makes it clear that the interval 
is known not to be negative.)


You can see the documentation by evaluating x.str?

Thanks,

Jason

-- 
Jason Grout


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to