#12149: float('nan')>1 crashes Sage.
--------------------------------+-------------------------------------------
   Reporter:  was               |          Owner:  AlexGhitza   
       Type:  defect            |         Status:  needs_review 
   Priority:  critical          |      Milestone:  sage-4.8     
  Component:  basic arithmetic  |       Keywords:               
Work_issues:                    |       Upstream:  N/A          
   Reviewer:                    |         Author:  William Stein
     Merged:                    |   Dependencies:               
--------------------------------+-------------------------------------------

Comment(by was):

 Replying to [comment:13 SimonKing]:
 > Replying to [comment:12 jdemeyer]:
 > > So it's a minor issue about specifications, not a big deal.  Doing
 something against the Python specifications isn't an issue if you're
 trying to avoid complete crashes of Sage.
 >
 > And what does that mean? Use William's patch, or a try-sig_on-sig_off-
 except patch?

 jdemeyer is remarking that as a general rule we should wrap code that
 might send SIGFPE signals  in sig_on/sig_off.    With the patch I've
 attached, I believe there is no possible way that the relevant code will
 ever send a SIGFPE signal.  For such code, it would make no sense at all
 to use sig_on/sig_off.

 I think SimonKing's timings above are bogus, because you say that you use
 "a = 1, b = 2, c = 1", which are all integers, yet the relevant code path
 will only be hit if one operand is a Sage integer and the other is a
 Python float.   You need to test with a Sage integer, a Python float that
 isn't float('nan'), and also with one that is.  Probably your differences
 in timings are meaningless noise.   I wish timeout output both a mean and
 standard deviation, so one could tell whether comparisons are meaningful.

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