Re: [sage-devel] Re: doctest failures due to rounding errors on Solaris.

2010-01-02 Thread Robert Bradshaw
On Jan 1, 2010, at 2:08 PM, TimDaly wrote: >> That is to say, if the Sage >> documentation says: >> >>sage: foo(bar) >>1.2345 >> >> but in fact in Sage one has >> >>sage: foo(bar) >>1.2351 >> >> then I would consider this misleading documentation, i.e., a bug. >> Your statement

Re: [sage-devel] Re: doctest failures due to rounding errors on Solaris.

2010-01-01 Thread Dr. David Kirkby
William Stein wrote: > > Test like your suggestion above would make perfect sense as unittests > or in the context of randomized testing. Those are great, there are > some in Sage, but they serve a different purpose than doctests. > > William > As a matter of interest, I wrote a few lines of

Re: [sage-devel] Re: doctest failures due to rounding errors on Solaris.

2010-01-01 Thread William Stein
On Fri, Jan 1, 2010 at 2:18 PM, Dr. David Kirkby wrote: > TimDaly wrote: > >> All non-bit floating point output involves a choice of rounding. >> You have chosen to do rounding by truncation. This choice is not >> obvious nor necessarily the best. See >> http://www.diycalculator.com/popup-m-round.

Re: [sage-devel] Re: doctest failures due to rounding errors on Solaris.

2010-01-01 Thread Dr. David Kirkby
TimDaly wrote: > All non-bit floating point output involves a choice of rounding. > You have chosen to do rounding by truncation. This choice is not > obvious nor necessarily the best. See > http://www.diycalculator.com/popup-m-round.shtml > > In any case, you're welcome to test any way you prefe

Re: [sage-devel] Re: doctest failures due to rounding errors on Solaris.

2009-12-31 Thread William Stein
On Thu, Dec 31, 2009 at 10:09 PM, Tim Daly wrote: > William Stein wrote: >> On Thu, Dec 31, 2009 at 9:13 PM, Tim Daly wrote: >> The output is used both for human use and for regression testing.  Its >> primary use is human -- it's an example in the Sage reference manual: >> >>    sage: float(e) >

Re: [sage-devel] Re: doctest failures due to rounding errors on Solaris.

2009-12-31 Thread William Stein
On Thu, Dec 31, 2009 at 10:09 PM, Tim Daly wrote: > William Stein wrote: >> On Thu, Dec 31, 2009 at 9:13 PM, Tim Daly wrote: >> The output is used both for human use and for regression testing.  Its >> primary use is human -- it's an example in the Sage reference manual: >> >>    sage: float(e) >

Re: [sage-devel] Re: doctest failures due to rounding errors on Solaris.

2009-12-31 Thread Tim Daly
William Stein wrote: > On Thu, Dec 31, 2009 at 9:13 PM, Tim Daly wrote: > >> Dr. David Kirkby wrote: >> >>> rjf wrote: >>> >>> On Dec 31, 11:15 am, "Dr. David Kirkby" wrote: >> RJF >> >> > The point you are missing is t

Re: [sage-devel] Re: doctest failures due to rounding errors on Solaris.

2009-12-31 Thread William Stein
On Thu, Dec 31, 2009 at 9:13 PM, Tim Daly wrote: > Dr. David Kirkby wrote: >> rjf wrote: >> >>> On Dec 31, 11:15 am, "Dr. David Kirkby" >>> wrote: >>> >>> > RJF > The point you are missing is that we want to compare the output what Sage prints to a human. >>> The

Re: [sage-devel] Re: doctest failures due to rounding errors on Solaris.

2009-12-31 Thread Tim Daly
Dr. David Kirkby wrote: > rjf wrote: > >> On Dec 31, 11:15 am, "Dr. David Kirkby" >> wrote: >> >> RJF >>> The point you are missing is that we want to compare the output what Sage >>> prints >>> to a human. >>> >>> >> The point you are missing is that the followi

Re: [sage-devel] Re: doctest failures due to rounding errors on Solaris.

2009-12-31 Thread Dr. David Kirkby
rjf wrote: > > On Dec 31, 11:15 am, "Dr. David Kirkby" > wrote: > >>> RJF >> The point you are missing is that we want to compare the output what Sage >> prints >> to a human. >> > > The point you are missing is that the following item, which presumably > could be printed by Sage, > is perfect

Re: [sage-devel] Re: doctest failures due to rounding errors on Solaris.

2009-12-31 Thread Dr. David Kirkby
rjf wrote: > You guys could eliminate one (I suspect major) source of confusion by > not printing the numbers in decimal and reading them back in from > character strings. > > You can read/write exact hexadecimal 64-bit floating-point binary > numbers. > or you can write them out as X base you c