#15799: floating point tolerance in gsl fft doctest
-------------------------------------+-------------------------------------
       Reporter:  vbraun             |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.2
      Component:  numerical          |   Resolution:
       Keywords:                     |    Merged in:
        Authors:                     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/vbraun/floating_point_tolerance_in_gsl_fft_doctest|  
56d129822e7c549b5f00758fc4707c25e780f64c
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by vbraun):

 * status:  new => needs_review
 * cc: lftabera, ppurka, mmezzarobba, mhansen (added)
 * component:  PLEASE CHANGE => numerical
 * commit:   => 56d129822e7c549b5f00758fc4707c25e780f64c
 * type:  PLEASE CHANGE => defect


Old description:



New description:

 The difference between 4.0=3.9999... and 3.99 is 1e-2, so if you doctest
 that with # abs tol 1e-2 then you are numerically unstable.
 {{{
 sage -t --long src/sage/gsl/fft.pyx
 **********************************************************************
 File "src/sage/gsl/fft.pyx", line 61, in sage.gsl.fft.FastFourierTransform
 Failed example:
     a                       #abs tol 1e-2
 Expected:
     [(36.0, 0.0), (-4.00, 9.65), (-4.0, 4.0), (-3.99, 1.65), (-4.0, 0.0),
 (-4.0, -1.65), (-4.0, -4.0), (-3.99, -9.65)]
 Got:
     [(36.0, 0.0), (-4.0, 9.65685424949238), (-4.000000000000001,
 3.9999999999999996), (-4.000000000000001, 1.6568542494923795), (-4.0,
 0.0), (-3.9999999999999996, -1.6568542494923801), (-3.9999999999999996,
 -3.9999999999999996), (-3.9999999999999982, -9.65685424949238)]
 Tolerance exceeded in 1 of 16
     -3.99 vs -4.000000000000001
 }}}

--

Comment:

 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=56d129822e7c549b5f00758fc4707c25e780f64c
 56d1298]||{{{do not abbreviate 3.99999... to 3.99 with # abs tol 1e-2}}}||

--
Ticket URL: <http://trac.sagemath.org/ticket/15799#comment:2>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to