[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-07 Thread Yann
On May 7, 9:24 pm, John Cremona wrote: > Thanks for taking the time to explain, Jason. > > 2009/5/7 Jason Grout : > > > > > > > John Cremona wrote: > >> 2009/5/7 Nick Alexander : > sage:RIF( 3 , 3.2 ) > 4.±1 > >>> -2 to unicode or whatever lets you type $\pm$. > > >>> As for the fact

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-07 Thread John Cremona
Thanks for taking the time to explain, Jason. 2009/5/7 Jason Grout : > > John Cremona wrote: >> 2009/5/7 Nick Alexander : sage:RIF( 3 , 3.2 ) 4.±1 >>> -2 to unicode or whatever lets you type $\pm$. >>> >>> As for the fact that 4.? is confusing to people who know nothing about >>> sage,

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-07 Thread Jason Grout
John Cremona wrote: > 2009/5/7 Nick Alexander : >>> sage:RIF( 3 , 3.2 ) >>> 4.±1 >> -2 to unicode or whatever lets you type $\pm$. >> >> As for the fact that 4.? is confusing to people who know nothing about >> sage, that does not concern me in the slightest. I find lots of >> things that I know

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-07 Thread John Cremona
2009/5/7 Nick Alexander : > >> sage:RIF( 3 , 3.2 ) >> 4.±1 > > -2 to unicode or whatever lets you type $\pm$. > > As for the fact that 4.? is confusing to people who know nothing about > sage, that does not concern me in the slightest.  I find lots of > things that I know nothing about confusing!

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-07 Thread Nick Alexander
> sage:RIF( 3 , 3.2 ) > 4.±1 -2 to unicode or whatever lets you type $\pm$. As for the fact that 4.? is confusing to people who know nothing about sage, that does not concern me in the slightest. I find lots of things that I know nothing about confusing! Nick --~--~-~--~~--

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-07 Thread William Stein
On Thu, May 7, 2009 at 10:08 AM, Yann wrote: > > On May 7, 3:38 am, Nick Alexander wrote: >> > 1.234567? >> >> +1 >> >> > 1.234567?1 is more >> >> -1 >> >> Nick > > +1 on this example... > I don't want to look stubborn but let's try another vote (it´s my last > comment on this thread...) > > sag

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-07 Thread Yann
On May 7, 3:38 am, Nick Alexander wrote: > > 1.234567? > > +1 > > > 1.234567?1 is more > > -1 > > Nick +1 on this example... I don't want to look stubborn but let's try another vote (it´s my last comment on this thread...) sage:RIF( 3 , 3.2 ) 4.? or sage:RIF( 3 , 3.2 ) 4.±1 --~--~-~--

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-06 Thread William Stein
On Wed, May 6, 2009 at 6:28 PM, Carl Witty wrote: > > On Wed, May 6, 2009 at 2:16 PM, Yann wrote: >> or print the error digit 4.?1 (expicit is better than implicit, >> etc :) ) > > Well, again this was an explicit decision; the thinking was that if > somebody saw 1.234567? they might be able to

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-06 Thread Jason Grout
Nick Alexander wrote: >> 1.234567? > > +1 > >> 1.234567?1 is more > > -1 I vote the same as Nick. Jason --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr.

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-06 Thread Robert Bradshaw
On May 6, 2009, at 6:38 PM, Nick Alexander wrote: > >> 1.234567? > > +1 > >> 1.234567?1 is more > > -1 Agreed. - Robert --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-de

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-06 Thread Nick Alexander
> 1.234567? +1 > 1.234567?1 is more -1 Nick --~--~-~--~~~---~--~~ 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:

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-06 Thread Carl Witty
On Wed, May 6, 2009 at 2:16 PM, Yann wrote: > or print the error digit 4.?1 (expicit is better than implicit, > etc :) ) Well, again this was an explicit decision; the thinking was that if somebody saw 1.234567? they might be able to guess approximately what it means without reading the document

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-06 Thread Yann
On May 6, 11:04 pm, Carl Witty wrote: > On Wed, May 6, 2009 at 1:46 PM, Yann 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;

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-06 Thread Carl Witty
On Wed, May 6, 2009 at 1:46 PM, Yann 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 fart

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-06 Thread Yann
On May 6, 6:35 pm, Carl Witty wrote: > On Wed, May 6, 2009 at 2:20 AM, Yann wrote: > > > Just for the record, > > isn't the following a bug? > > > sage: p=RealIntervalField(4)(3.1) > > sage: p.str(style='brackets') > > '[3.00 .. 3.25]' > > sage: p > > 4.? > > It's a deliberate design decision.

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-06 Thread Carl Witty
On Wed, May 6, 2009 at 2:20 AM, Yann wrote: > > Just for the record, > isn't the following a bug? > > sage: p=RealIntervalField(4)(3.1) > sage: p.str(style='brackets') > '[3.00 .. 3.25]' > sage: p > 4.? It's a deliberate design decision. To quote from real_mpfi.pyx: When there are two

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-06 Thread mabshoff
On May 6, 2:35 am, Yann wrote: > It's trac #5942 Ok, it looked familiar. I have CCed Carl Witty on the ticket so he is aware of its existence, not that this implies that he has to fix it. Cheers, Michael --~--~-~--~~~---~--~~ To post to this group, send email

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-06 Thread Yann
It's trac #5942 On May 6, 11:30 am, mabshoff wrote: > On May 6, 2:20 am, Yann wrote: > > > Just for the record, > > isn't the following a bug? > > It looks like one to me. > > > sage: p=RealIntervalField(4)(3.1) > > sage: p.str(style='brackets') > > '[3.00 .. 3.25]' > > sage: p > > 4.? > > The

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-06 Thread mabshoff
On May 6, 2:20 am, Yann wrote: > Just for the record, > isn't the following a bug? It looks like one to me. > sage: p=RealIntervalField(4)(3.1) > sage: p.str(style='brackets') > '[3.00 .. 3.25]' > sage: p > 4.? The printing is a little odd, I would expect it to print 3.? cwitty? Cheers, Mi

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-06 Thread Yann
Just for the record, isn't the following a bug? sage: p=RealIntervalField(4)(3.1) sage: p.str(style='brackets') '[3.00 .. 3.25]' sage: p 4.? --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-05 Thread William Stein
On Tue, May 5, 2009 at 11:16 PM, Henryk Trappmann wrote: > > Ah now I see, you mean though it displays 1/384 it is internally still > the above sum, which is computed when evaluated with n. True. In Sage right now the internal form of the expression (not the simplified form) is used by the "n"

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-05 Thread Henryk Trappmann
Ah now I see, you mean though it displays 1/384 it is internally still the above sum, which is computed when evaluated with n. Well but then this contains imho 2 bugs: 1. 1**(a/b) should be the integer 1. 2. The display of a SymbolicArithmetic should show whats really there and not reduce before

[sage-devel] Re: strange rounding with SymbolicArithmetic

2009-05-05 Thread Nick Alexander
On 5-May-09, at 5:00 PM, Henryk Trappmann wrote: > > sage: a = 1/(48*sqrt(1)) - 7/(96*1**(3/2)) + 3/(32*1**(5/2)) - 5/ > (128*1**(7/2)) > sage: a > 1/384 > sage: for k in range(5): print a.n(digits=10-k) > : > 0.00260418 > 0.00260416669 > 0.0026041665 > 0.002604164 > 0.00260419 I cannot