#17549: Rephrase the 'doctest flags' section of the developer's manual
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  ncohen                 |       Status:  needs_work
           Type:         |    Milestone:  sage-6.5
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:         |    Reviewers:
  documentation          |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  6ff61bdd86d0031d12e13cf89d0e4041da343bc3
  Nathann Cohen          |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  u/ncohen/17549         |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by jdemeyer):

 Perhaps add something along the lines of
 {{{
 If a doctest with tolerance contains several numbers, each of them is
 checked individually::

     sage: print "The sum of 1 and 1 equals 5"  # abs tol 1
     The sum of 2 and 2 equals 4

 As a consequence of this, tests involving complex numbers, matrices or
 polynomials usually work as expected::

     sage: <complex number example here>
     sage: M = Matrix(RR, 3, 3, [-13, 1, 1, -3, 0, -2, -4, -2, 0])
     sage: M^-1 * M   # actual result
     [     1.00000000000000  6.93889390390723e-18 -6.24500451351651e-17]
     [ 4.44089209850063e-16      1.00000000000000  1.11022302462516e-16]
     [-1.94289029309402e-16 -1.38777878078145e-17      1.00000000000000]
     sage: M^-1 * M   # tol 2e-16
     [ 1.00000000000000 0.000000000000000 0.000000000000000]
     [0.000000000000000  1.00000000000000 0.000000000000000]
     [0.000000000000000 0.000000000000000  1.00000000000000]

 Note that, in the last example, the zeros are checked with **absolute**
 tolerance, while the non-zero entries are checked with **relative**
 tolerance.
 }}}

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