Le 04/02/2012 23:11, Robert Bradshaw a écrit :
On Sat, Feb 4, 2012 at 8:17 AM, rjf<fate...@gmail.com> wrote:
On Feb 2, 1:16 pm, Julien Puydt<julien.pu...@laposte.net> wrote:
Le 02/02/2012 23:22, Jonathan Bober a crit :
Can you think of a reason that the answer should change? Does maxima use
less that 53 bits of precision ever?
Well, if I don't err, $10^{17}$ has 18 decimal digits, which is more
than the 15,95.. that fit in 53 binary digits.
One doesn't care about decimal digits, only binary digits. The fact
that this change is being pushed by someone who doesn't understand
this distinction is worrisome.
Hum! Yes, I made a mistake, but I'm surprised you're still trying to
explain the mistake two days after I wrote : "Ah, yes ; I forgot powers
of 10 contain powers of two and hence have a few zero digits at the end!".
While not as bad as cos(0.0) != 1.0, or violating monotonicity, it's
still pretty bad.
I think cos(0.0) != 1.0 isn't bad, since 0.0 isn't zero anyway, and 1.0
isn't one anyway. In fact, I would welcome if using strict comparisons
on floats triggered an exception.
And this monotonicity condition in numerical approximations is new to
me... do you have a reference handy? I always thought the only condition
was on relative error.
Note that what is broken[1] here is ARM's libc, if one types
"gamma(6.0)" one gets "120.000000000000" on all systems. It's a
question about gamma(float(6.0)) which is explicitly requesting the
(presumably faster but potentially less accurate) system
implementation. The question is should we
>
1) Weaken this doctest to support this broken platform.
2) Provide a workaround for this platform (e.g. using gsl or similar)
to avoid the broken implementation of gamma.
3) Mark this test as broken (not tested?) on ARM, and ARM only.
I think options 2& 3 are far superior to 1.
Weakening the tests to "#tol rel" seems pretty reasonable, as testing
equality on floats is asking for trouble.
Even so :
(1) the test on SR(10.0r).gamma() would still not pass, because the
implementation isn't good enough ;
(2) the fact that float(maxima("1.7e17")) doesn't give an exact result
is worrying, even if the test passes with "#tol rel", and should be
investigated.
Snark on #sagemath
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org