#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 drkirkby):

 Replying to [comment:77 leif]:

 > In the light of the "user warning" given, I think using dots is
 acceptable here.


 Yes, agreed. Just in general I think this method of comparing floating
 point numbers is rather dumb.

 > W.r.t. 387 vs. SSE, try this:
 === SSE ===
 {{{
 drkir...@hawk:~$ gcc test3.c -lm -mfpmath=sse
 drkir...@hawk:~$ ./a.out
 float:
 +1.7724539041519165039062500000000000000000000000000000000000000000000000
 -1.7724539041519165039062500000000000000000000000000000000000000000000000
 double:
 +1.7724538509055158819194275565678253769874572753906250000000000000000000
 -1.7724538509055158819194275565678253769874572753906250000000000000000000
 long double:
 +1.7724538509055159927248895845863785325491335242986679077148437500000000
 -1.7724538509055159927248895845863785325491335242986679077148437500000000
 }}}
 === 387 ===
 {{{
 drkir...@hawk:~$ gcc test3.c -lm -mfpmath=387
 drkir...@hawk:~$ ./a.out
 float:
 +1.7724539041519165039062500000000000000000000000000000000000000000000000
 -1.7724538755670267153874419818748719990253448486328125000000000000000000
 double:
 +1.7724538509055158819194275565678253769874572753906250000000000000000000
 -1.7724538509055158819194275565678253769874572753906250000000000000000000
 long double:
 +1.7724538509055159927248895845863785325491335242986679077148437500000000
 -1.7724538509055159927248895845863785325491335242986679077148437500000000
 }}}

 > I only get a different result for the negated square root in the float
 case with 387 code (Core2, gcc 4.4.3).

 Yes, I too get different results (!OpenSolaris, Intel Xeon W3580 @ 3.33
 GHz, gcc 4.5.0)

 Perhaps Paul has some comments on those different numbers. They would
 appear to violate one of the principle claims of IEE-754 to me, but
 perhaps I am wrong.

 Dave

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10042#comment:78>
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.

Reply via email to