#10042: Doctest failure in sage/rings/polynomial/polynomial_element.pyx
-----------------------+----------------------------------------------------
Reporter: mpatel | Owner: mvngu
Type: defect | Status: needs_info
Priority: blocker | Milestone: sage-4.6
Component: doctest | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------+----------------------------------------------------
Comment(by drkirkby):
Replying to [comment:6 zimmerma]:
> > I've not looked at this code, but is this only using machine
precision?
> > If so, why is there any surprise this acts differently on different
machines?
>
> if the code is only using basic arithmetic operations and the square
root, which is what it should
> do to solve {{{x^2-pi}}} (which is what the failing test does) the
behaviour should not depend on
> the machine used, since those operations are standardized by IEEE 754.
>
> Paul
But the maths library is not standardised by IEEE 754. It's known for
example that exp(1.0) gives a different answer on SPARC to x86.
That said, the fact the answers should be sqrt(pi) and -sqrt(pi), one
might hope that one gets the same magnitude I must admit.
I just created a noddy C program on my !OpenSolaris machine where this
failed.
{{{
drkir...@hawk:~$ cat test.c
#include <stdio.h>
#include <math.h>
volatile double x=M_PI;
int main() {
printf ("%.70lf\n",sqrt(x));
}
drkir...@hawk:~$ gcc -lm test.c
drkir...@hawk:~$ ./a.out
1.7724538509055158819194275565678253769874572753906250000000000000000000
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10042#comment:7>
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.