#17126: Floating-point precision issues fail matrix2.py doctests
-------------------------+-------------------------------------------------
   Reporter:  darij      |            Owner:
       Type:  defect     |           Status:  new
   Priority:  major      |        Milestone:  sage-6.4
  Component:  PLEASE     |         Keywords:  doctest failure, floating
  CHANGE                 |  point, precision, matrix
  Merged in:             |          Authors:
  Reviewers:             |  Report Upstream:  N/A
Work issues:             |           Branch:
     Commit:             |     Dependencies:
   Stopgaps:             |
-------------------------+-------------------------------------------------
 This is on the develop branch at version 6.4beta4:

 {{{
 darij@travis-virtualbox:~/gitsage$ ./sage -bt src/sage/matrix/matrix2.pyx
 scons: `install' is up to date.
 Updating Cython code....
 Enabling Cython debugging support
 Finished Cythonizing, time: 6.46 seconds.
 Discovering Python source code....
 Discovered Python source, time: 0.03 seconds.
 Cleaning up stale installed files....
 - cleaning /home/darij/sage-6.3.beta6/local/lib/python2.7/site-packages
 - cleaning /home/darij/sage-6.3.beta6/local/lib/site-python
 - cleaning /home/darij/sage-6.3.beta6/src/build/lib.linux-i686-2.7
 Finished cleaning, time: 0.14 seconds.
 running install
 running build
 running build_py
 running build_ext
 Executing 0 commands (using 1 thread)
 Time to execute 0 commands: 0.11 seconds.
 Total time spent compiling C/C++ extensions: 0.31 seconds.
 running install_lib
 running install_egg_info
 Removing /home/darij/sage-6.3.beta6/local/lib/python2.7/site-
 packages/sage-6.4.beta4-py2.7.egg-info
 Writing /home/darij/sage-6.3.beta6/local/lib/python2.7/site-
 packages/sage-6.4.beta4-py2.7.egg-info
 too many failed tests, not using stored timings
 Running doctests with ID 2014-10-09-21-38-47-a9d849b9.
 Doctesting 1 file.
 sage -t src/sage/matrix/matrix2.pyx
 **********************************************************************
 File "src/sage/matrix/matrix2.pyx", line 5209, in
 sage.matrix.matrix2.Matrix.diagonal.eigenspaces_right
 Failed example:
     eigenvalues = em[0]; eigenvalues.dense_matrix().zero_at(1e-15)
 Expected:
     [ 13.348469228349...                0.0                 0.0]
     [                0.0 -1.348469228349...                 0.0]
     [                0.0                0.0                 0.0]
 Got:
     [13.348469228349522                0.0                0.0]
     [               0.0 -1.348469228349534                0.0]
     [               0.0                0.0                0.0]
 **********************************************************************
 File "src/sage/matrix/matrix2.pyx", line 5689, in
 sage.matrix.matrix2.Matrix.diagonal.eigenmatrix_right
 Failed example:
     evalues = em[0]; evalues.dense_matrix().zero_at(2e-15)
 Expected:
     [ 13.348469228349...                0.0                 0.0]
     [                0.0 -1.348469228349...                 0.0]
     [                0.0                0.0                 0.0]
 Got:
     [13.348469228349522                0.0                0.0]
     [               0.0 -1.348469228349534                0.0]
     [               0.0                0.0                0.0]
 **********************************************************************
 File "src/sage/matrix/matrix2.pyx", line 12207, in
 sage.matrix.matrix2.Matrix.diagonal.norm
 Failed example:
     A.norm()
 Expected:
     15.0
 Got:
     14.999999999999998
 **********************************************************************
 3 items had failures:
    1 of  19 in sage.matrix.matrix2.Matrix.diagonal.eigenmatrix_right
    1 of  24 in sage.matrix.matrix2.Matrix.diagonal.eigenspaces_right
    1 of  18 in sage.matrix.matrix2.Matrix.diagonal.norm
     [2116 tests, 3 failures, 17.51 s]
 ----------------------------------------------------------------------
 sage -t src/sage/matrix/matrix2.pyx  # 3 doctests failed
 ----------------------------------------------------------------------
 Total time for all tests: 18.4 seconds
     cpu time: 16.5 seconds
     cumulative wall time: 17.5 seconds
 }}}

 I suspect I should post some system info, but I don't know what kind of,
 so I fear you'll have to worm it out of me. Here is some random data:

 {{{
 darij@travis-virtualbox:~/gitsage$ lscpu
 Architecture:          i686
 CPU op-mode(s):        32-bit, 64-bit
 Byte Order:            Little Endian
 CPU(s):                2
 On-line CPU(s) list:   0,1
 Thread(s) per core:    1
 Core(s) per socket:    2
 Socket(s):             1
 Vendor ID:             GenuineIntel
 CPU family:            6
 Model:                 42
 Stepping:              7
 CPU MHz:               1973.427
 BogoMIPS:              3943.87
 L1d cache:             32K
 L1d cache:             32K
 L2d cache:             6144K
 darij@travis-virtualbox:~/gitsage$ uname -a
 Linux travis-virtualbox 3.2.0-69-generic #103-Ubuntu SMP Tue Sep 2
 05:03:16 UTC 2014 i686 i686 i386 GNU/Linux
 darij@travis-virtualbox:~/gitsage$ uname -m
 i686
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/17126>
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/d/optout.

Reply via email to