#10042: Doctest failure in sage/rings/polynomial/polynomial_element.pyx
-------------------------------+--------------------------------------------
Reporter: mpatel | Owner: mvngu
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.6
Component: doctest | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: report upstream |
-------------------------------+--------------------------------------------
Changes (by dimpase):
* priority: blocker => major
Comment:
Replying to [comment:64 drkirkby]:
> I tried playing with the compiler flags on a noddy C program. My Fortran
is almost non-existant, but perhaps it's worth trying a Fortran program.
But I can't change the values of these parameters in my Noddy C program by
use of compiler flags.
>
We are computing the roots of f(x)=x**2-Pi by computing the eigenvalues of
the matrix
{{{
[[0.0, Pi],
[1.0, 0.0]]
}}}
We call LAPACK's DGEEV that does just that, by a relatively nontrivial
iterative procedure, The stopping condition is related to the precision
guaranteed by LAPACK, and it turns out, on some floating point
architectures, that the error in computing the negative root is very close
to the precision guaranteed by LAPACK: A test program that calls DGEEV on
this matrix, on MacOSX 10.5 (PPC G4) outputs:
{{{
Eigenvalue( 1) = 1.77245385090551588191942755656782538E+00
Eigenvalue( 2) =-1.77245385090551610396403248159913346E+00
Difference in absolute value 2.22044604925031308084726333618164063E-16
}}}
whereas LAPACK precision (for doubles) is, taken from install.log:
{{{
Precision = 2.220446049250313E-016
}}}
Why does anyone think LAPACK must do better than that, I do not
understand. Indeed, some other hardwares do better on this example, but
this is just pure luck, and/or ability to get better precision from the
hardware--- something that is not available on G4 PPC --- or rather the
compiler cannot take full advantage of the hardware.
I propose to adjust the precision in doctests, and be done with it. It is
not a bug...
I take the liberty to reduce the priority to major.
Dima
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10042#comment:65>
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.