#10042: Doctest failure in sage/rings/polynomial/polynomial_element.pyx
------------------------------+---------------------------------------------
Reporter: mpatel | Owner: mvngu
Type: defect | Status: positive_review
Priority: blocker | Milestone: sage-4.6
Component: doctest | Keywords:
Author: Dima Pasechnik | Upstream: N/A
Reviewer: Leif Leonhardy | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Comment(by leif):
Replying to [comment:76 drkirkby]:
> What I find annoying about these doctests is that whilst the output will
be {{{1.772453850905515}}} or {{{1.772453850905516}}} depending on system.
With these changes, now anything from {{{1.772453850905510}}} to
{{{1.772453850905519}}} is considered acceptable. So we have permitted
'errors' several times higher than necessary.
>
> In some cases, I've met in the past, the adding of ... has resulted in
results errors 1000x higher being considered acceptable. IMHO, this method
of testing is not very good.
In the light of the "user warning" given, I think using dots is acceptable
here.
----
W.r.t. 387 vs. SSE, try this:
{{{
#!C
#include <stdio.h>
#include <math.h>
volatile double x=M_PI;
int main() {
printf ("float:\n%+.70f\n%+.70f\n",sqrtf((float)x),-sqrtf((float)x));
printf ("double:\n%+.70lf\n%+.70lf\n",sqrt(x),-sqrt(x));
printf ("long double:\n%+.70Lf\n%+.70Lf\n",
sqrtl((long double)x),
-sqrtl((long double)x));
return 0;
}
}}}
I only get a different result for the negated square root in the
{{{float}}} case with 387 code (Core2, gcc 4.4.3).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10042#comment:77>
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.