Re: [sage-devel] Re: Dealing with libc math differences

2016-08-22 Thread Erik Bray
On Sat, Aug 20, 2016 at 3:47 PM, leif wrote: > Erik Bray wrote: >> On Fri, Aug 19, 2016 at 11:00 AM, Erik Bray wrote: >>> On Wed, Aug 10, 2016 at 1:38 PM, Erik Bray wrote: Hi all, Sorry if this has been discussed ad-infinitum before--I looked around a bit but didn't find a de

[sage-devel] Re: Dealing with libc math differences

2016-08-20 Thread leif
Erik Bray wrote: > On Fri, Aug 19, 2016 at 11:00 AM, Erik Bray wrote: >> On Wed, Aug 10, 2016 at 1:38 PM, Erik Bray wrote: >>> Hi all, >>> >>> Sorry if this has been discussed ad-infinitum before--I looked around >>> a bit but didn't find a definitive answer. >>> >>> I have one (well at least one

[sage-devel] Re: Dealing with libc math differences

2016-08-19 Thread Erik Bray
On Fri, Aug 19, 2016 at 11:00 AM, Erik Bray wrote: > On Wed, Aug 10, 2016 at 1:38 PM, Erik Bray wrote: >> Hi all, >> >> Sorry if this has been discussed ad-infinitum before--I looked around >> a bit but didn't find a definitive answer. >> >> I have one (well at least one) test that's failing on C

[sage-devel] Re: Dealing with libc math differences

2016-08-19 Thread Erik Bray
On Wed, Aug 10, 2016 at 1:38 PM, Erik Bray wrote: > Hi all, > > Sorry if this has been discussed ad-infinitum before--I looked around > a bit but didn't find a definitive answer. > > I have one (well at least one) test that's failing on Cygwin due to > tiny difference in the last digit of the resu

[sage-devel] Re: Dealing with libc math differences

2016-08-12 Thread leif
Jeroen Demeyer wrote: > On 2016-08-12 11:24, leif wrote: >> Yeah, the doctest framework should automatically base the tolerance on >> such comparisons... ;-) :P > > I don't know how serious you use, but you have to keep in mind that the > doctest framework works with strings. The main problem is t

Re: [sage-devel] Re: Dealing with libc math differences

2016-08-12 Thread Jeroen Demeyer
On 2016-08-12 11:24, leif wrote: Yeah, the doctest framework should automatically base the tolerance on such comparisons... ;-) :P I don't know how serious you use, but you have to keep in mind that the doctest framework works with strings. The main problem is that you would need to guess the

[sage-devel] Re: Dealing with libc math differences

2016-08-12 Thread leif
Erik Bray wrote: > On Fri, Aug 12, 2016 at 9:42 AM, Jeroen Demeyer > wrote: >> On 2016-08-11 12:24, Erik Bray wrote: >>> >>> In this case the difference is just one ulp. >> >> >> To be more precise: the difference is actually about 0.59 ulp on Cygwin: >> >> sage: R = RealField(256) >> sage: log3_

[sage-devel] Re: Dealing with libc math differences

2016-08-11 Thread leif
Erik Bray wrote: > On Thu, Aug 11, 2016 at 2:17 PM, Dima Pasechnik wrote: >>> FWIW, on Cygwin we used to use the Cephes library for a while. (No idea >>> whether it now replaced libm or parts of it got merged into libm >>> upstream, or none of that.) >>> >>> But the result you get presumably also

Re: [sage-devel] Re: Dealing with libc math differences

2016-08-11 Thread Erik Bray
On Thu, Aug 11, 2016 at 2:17 PM, Dima Pasechnik wrote: >> FWIW, on Cygwin we used to use the Cephes library for a while. (No idea >> whether it now replaced libm or parts of it got merged into libm >> upstream, or none of that.) >> >> But the result you get presumably also depends on whether libm

[sage-devel] Re: Dealing with libc math differences

2016-08-11 Thread Dima Pasechnik
On Thursday, August 11, 2016 at 12:15:32 PM UTC+1, leif wrote: > > Erik Bray wrote: > > On Wed, Aug 10, 2016 at 2:45 PM, Thierry Dumont > > > wrote: > >> Le 10/08/2016 à 13:38, Erik Bray a écrit : > >>> Hi all, > >>> > >>> Sorry if this has been discussed ad-infinitum before--I looked aroun

[sage-devel] Re: Dealing with libc math differences

2016-08-11 Thread leif
Erik Bray wrote: > On Wed, Aug 10, 2016 at 2:45 PM, Thierry Dumont > wrote: >> Le 10/08/2016 à 13:38, Erik Bray a écrit : >>> Hi all, >>> >>> Sorry if this has been discussed ad-infinitum before--I looked around >>> a bit but didn't find a definitive answer. >>> >>> I have one (well at least one)

[sage-devel] Re: Dealing with libc math differences

2016-08-10 Thread Marc Mezzarobba
Jeroen Demeyer wrote: > If the error is 1 ulp or more for a basic function (like log) on a > reasonable non-pathological input (like 3.0), I would consider that > an upstream bug. Quite a few implementations only provide accuracies of 3-4 ulp for speed reasons (it may make it possible to use doub

[sage-devel] Re: Dealing with libc math differences

2016-08-10 Thread leif
Erik Bray wrote: > Hi all, > > Sorry if this has been discussed ad-infinitum before--I looked around > a bit but didn't find a definitive answer. > > I have one (well at least one) test that's failing on Cygwin due to > tiny difference in the last digit of the result of log(3). > > This leads to

[sage-devel] Re: Dealing with libc math differences

2016-08-10 Thread Travis Scrimshaw
Hey Erik, It seems like what you want is # rel tol XYZ or # abs tol XYZ. For an example, see rings/real_double.pyx. Best, Travis On Wednesday, August 10, 2016 at 6:38:59 AM UTC-5, Erik Bray wrote: > > Hi all, > > Sorry if this has been discussed ad-infinitum before--I looked around > a bit