On May 6, 11:04 pm, Carl Witty <carl.wi...@gmail.com> wrote:
> On Wed, May 6, 2009 at 1:46 PM, Yann <yannlaiglecha...@gmail.com> wrote:
> >> In other words,
> >> sage: RealIntervalField(4)(0, 1)
> >> 1.?
> >> prints as the interval [0 .. 2], rather than [-1 .. 1], because IMHO
> >> it is useful to be able to know that an interval is nonnegative; and
> >> we do this by always picking the result farther from zero whenever
> >> there are two possible "correct" printings.  (Note that 3.? and 4.?
> >> would both include the interval [3.00 .. 3.25], so they are both
> >> correct in that sense.)
>
> > I would agree if it was 4.?1 (even I find something like 4.?±1 easier
> > to understand)
> > but without the error explicitely written, I would prefer to do what
> > is in the docstring:
> >   " In question style (the default), we print the "known correct"
> > part of the number "
> > My understanding of this sentence is that we print the digits known
> > for sure. And if a
> > number is in the interval [3.00 .. 3.25], this should be 3.?
> > The design you decision si only relevant IMHO if the error digits are
> > explicitely written
>
> We definitely don't want to print "the digits known for sure".
> Consider the interval [0.999999 .. 1.000001], which would print as
> 1.000000? with the current code (I'm ignoring the fact that the
> endpoints are not exactly representable in binary).  With printing
> "the digits known for sure", the first digit that we know for sure is
> the tens digit, which is known to be zero; that would give 0.?e1,
> which gives vastly less information than 1.000000?.
>
> Perhaps the docstring you quote should be adjusted?  Elsewhere (in the
> module docstring) we find this variant:
>
> In question style, we print the "known correct" part of the number,
> followed by a question mark. The question mark indicates that the
> preceding digit is possibly wrong by +/- 1.
>
> Maybe that second sentence should be copied into the docstring for .str()?
>
> Carl

or print the error digit 4.?1 (expicit is better than implicit,
etc :) )
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send 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