Re: [sage-devel] Re: Default representation of intervals

2010-07-11 Thread Carl Witty
Dirk, I'd prefer to have this discussion on sage-devel, where it will be archived and other people can chip in as well. So I'm replying both to you and to sage-devel... I hope you don't mind. On Sun, Jul 11, 2010 at 3:56 AM, Dirk Laurie wrote: > On Fri, Jul 09, 2010 at 11:39:15PM -0700, Carl Wit

Re: [sage-devel] Re: Default representation of intervals

2010-07-09 Thread Carl Witty
Sorry to be so late (10 months late!) in responding to this; I'm getting back to Sage development and I'm reading through my sage-devel archives. Dirk, I don't know if you still care about this... I'm the original author of the code (and documentation) in question. I basically made up the behavio

[sage-devel] Re: Default representation of intervals

2009-09-09 Thread Dirk
On Sep 9, 9:35 pm, Dirk wrote: > Any fixed-point representation is dubious when dealing with bounds > that have no significant digits in common, and nonsensical when they > are not of the same order of magnitude. Maybe automatically revert to > bracket notation as is done for Infinity and NaN. >

[sage-devel] Re: Default representation of intervals

2009-09-09 Thread Dirk
On Sep 9, 8:28 pm, Yann wrote: > Hi, > Just to be sure I understand your proposal, would the following be the > expected behavior? > > sage: RIF(7,123).str() > '0?' > sage:RIF(7,123).str(error_digits=1) > '0?0..2e2' > sage:RIF(7,123).str(error_digits=2) > '0?00..13e1' > sage:RIF(7,123).str(error_

[sage-devel] Re: Default representation of intervals

2009-09-09 Thread Jason Grout
Dirk wrote: > > > On Sep 9, 6:17 pm, Jason Grout wrote: > >> That's how I understand it from the documentation. Wow, I really like >> your explanation. Would you care if we included that in the >> documentation? Are you comfortable submitting a patch to the documentation? > Not really, in v

[sage-devel] Re: Default representation of intervals

2009-09-09 Thread Yann
Hi, Just to be sure I understand your proposal, would the following be the expected behavior? sage: RIF(7,123).str() '0?' sage:RIF(7,123).str(error_digits=1) '0?0..2e2' sage:RIF(7,123).str(error_digits=2) '0?00..13e1' sage:RIF(7,123).str(error_digits=3) '0?007...123' NB: actual behavior is sage:

[sage-devel] Re: Default representation of intervals

2009-09-09 Thread Dirk
On Sep 9, 6:17 pm, Jason Grout wrote: > That's how I understand it from the documentation.  Wow, I really like > your explanation.  Would you care if we included that in the > documentation?  Are you comfortable submitting a patch to the documentation? Not really, in view of my response to the

[sage-devel] Re: Default representation of intervals

2009-09-09 Thread Jason Grout
Dirk wrote: > > > On Sep 9, 2:42 pm, Jason Grout wrote: >> 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 en

[sage-devel] Re: Default representation of intervals

2009-09-09 Thread Dirk
On Sep 9, 2:42 pm, Jason Grout wrote: > 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 t

[sage-devel] Re: Default representation of intervals

2009-09-09 Thread Jason Grout
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?'.