#11672: Some more doctests from the book "Calcul mathématique avec Sage"
-----------------------------------+----------------------------------------
Reporter: mmezzarobba | Owner: mvngu
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-5.7
Component: doctest | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: Martin Albrecht, Charles
Bouillaguet
Authors: Marc Mezzarobba | Merged in:
Dependencies: | Stopgaps:
-----------------------------------+----------------------------------------
Comment (by mmezzarobba):
Replying to [comment:19 Bouillaguet]:
> Either your computation is ill-conditioned, and the test should be
removed from Sage (and probably also from the book), or there is a
component of sage that misbehaves. We should understand what the situation
is, and act accordingly.
Sorry for the lack of context. Yes, the computation is ill-conditioned,
that's deliberate (see http://purple.lateralis.org/sagebook-r1014.pdf, p.
210-211), and all three results above are completely wrong (the correct
result is x=6.305...).
As Paul noted, in an ideal world, this code should nontheless yield the
same result everywhere, so it might have made sense to test that the
result didn't change over time. But there are a number of reasonable
explanations for what we observe, and (as far as I can tell) in Sage,
floating-point results are usually interpreted as mere approximations that
should agree with the correct answer "up to some numerical noise" rather
than well-defined exact results. So I am in favor of dropping this
testcase—unless the policy ''is'' that machine-precision floating-point
computations should yield exactly the same result on all platforms.
(Of course, this doesn't mean we shouldn't try to understand exactly what
is going on!)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11672#comment:21>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.