#13427: Numerical noise causing sage/numerical/optimize.py to fail on SPARC
-------------------------+--------------------------------------------------
   Reporter:  drkirkby   |             Owner:  jason, jkantor
       Type:  defect     |            Status:  new           
   Priority:  major      |         Milestone:  sage-5.4      
  Component:  numerical  |          Keywords:  solaris, glpk 
Work issues:             |   Report Upstream:  N/A           
  Reviewers:             |           Authors:                
  Merged in:             |      Dependencies:                
   Stopgaps:             |  
-------------------------+--------------------------------------------------
 Using:

  * Sage 5.3.rc0 built with gcc 4.5.0 (i.e. NOT the gcc in Sage)
  * Solaris 10 3/05 s10_74L2a SPARC
  * Sun Blade 2000 with two 1200 MHz UltraSPARC III CPUs

 {{{
 File "/export/home/drkirkby/sage-5.3.rc0/devel/sage-
 main/sage/numerical/optimize.py", line 135:

   sage: find_local_maximum(fast_float(8*e^ (-x)*sin(x) - 1, x), 0, 8)^

 Expected:

   (1.579175535558..., 0.78539817...)

 Got:

   (1.5791755355586758, 0.78539816111340355)
 }}}
 Actually, the result returned on SPARC is more accurate in this instance,
 as according to Mathematica 7 at least,

 {{{
 In[3]:= FindMaximum[8 E^(-x) Sin[x] -1,{x,0,8},WorkingPrecision->50]

 Out[3]= {1.5791755355586755940189354764810356787023224274029,

 >    {x -> 0.78539816339744830961566077712689095303902649201882}}

 In[4]:=
 }}}
 So on SPARC, the relative error is 2.91x10^-9^ and the absolute error of
 -2.28x10^-9^ So the test needs changing to '0.7853981...' rather than
 '0.78539817...'

 I'll attach a patch later.

 Dave

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13427>
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