#19797: Build GSL in IEEE 754 compliant mode
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-7.0
      Component:  packages:          |   Resolution:
  standard                           |    Merged in:
       Keywords:                     |    Reviewers:
        Authors:  Jeroen Demeyer     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  694feb2d71ebf521cf5f32dba69e0406d16e9f11
  u/jdemeyer/ticket/19797            |     Stopgaps:
   Dependencies:  #19796             |
-------------------------------------+-------------------------------------
Changes (by vbraun):

 * cc: rws (added)
 * commit:   => 694feb2d71ebf521cf5f32dba69e0406d16e9f11


Comment:

 Isn't this sacrificing a lot of numerical performance? At least IEEE
 754-2008 contains fused multiply-add.

 The doctest is
 {{{
             sage: x = var('x', domain='real')
             sage: s = abs((1+I*x)^4); s
             (I*x + 1)^2*(-I*x + 1)^2
             sage: s._plot_fast_callable(x)
             <sage.ext.interpreters.wrapper_py.Wrapper_py object at ...>
             sage: s._plot_fast_callable(x)(10)
             10201
             sage: abs((I*10+1)^4)
             10201
             sage: plot(s)
             Graphics object consisting of 1 graphics primitive
 }}}
 Isn't the real problem that abs does not default to `hold=True`, so
 something that ought to be manifestly real is not. Compare:
 {{{
 sage: abs((1+I*x)^4)._plot_fast_callable(x)(RDF(10))
 10201.00000000001
 sage: type(_)
 <type 'sage.rings.complex_double.ComplexDoubleElement'>
 }}}
 vs.
 {{{
 sage: ((1+I*x)^4).abs(hold=True)._plot_fast_callable(x)(RDF(10))
 10201.000000000005
 sage: type(_)
 <type 'sage.rings.real_double.RealDoubleElement'>
 }}}
 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=e4686731d4d1acb1f75b223a0e855bff1c3b8561
 e468673]||{{{Simplify build of interpreters by skipping header files}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=694feb2d71ebf521cf5f32dba69e0406d16e9f11
 694feb2]||{{{Build GSL in IEEE 754 compliant mode}}}||

--
Ticket URL: <http://trac.sagemath.org/ticket/19797#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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to