Hi,

all those numerical noise appearing suddenly, couldn't that mean that
some numerical algorithm became less stable/accurate somewhere in the
code ?

If it turns out to be the case, we should thank doctests for the
discovery, not asking them to shut up by enlarging the tolerance !

Also, in the case where the error is just "going the other way", we
should not enlarge the tolerence, but instead have an exact expected
result in the doctest. For example, (see #17291):

On Tue, Nov 04, 2014 at 05:15:29PM +0000, John Cremona wrote:
> File "src/sage/tests/french_book/linsolve_doctest.py", line 51, in
> sage.tests.french_book.linsolve_doctest
> Failed example:
>     x = A\b; x  # rel tol 1e-15
> Expected:
>     (-0.20000000000000018, 0.9000000000000001)
> Got:
>     (-0.19999999999999987, 0.8999999999999999)
> Tolerance exceeded in 1 of 2:
>     -0.20000000000000018 vs -0.19999999999999987, tolerance 2e-15 >
>     1e-15

We should expect (-0.2, 0.9) with the previous tolerance instead of
enlarging the tolerance (therefore weakening the doctest) with an
inexact expected result, since the errors are of the same magnitude but
not the same direction.

The same holds for, for example (see #17278):

On 04/11/2014 14:16, John Cremona wrote:> It's a long time since I have
> File "src/sage/matrix/matrix_double_dense.pyx", line 87, in
> sage.matrix.matrix_double_dense.
> Matrix_double_dense
> Failed example:
>     m^(-1)
> Expected:
>     [-1.9999999999999996  0.9999999999999998]
>     [ 1.4999999999999998 -0.4999999999999999]
> Got:
>     [-2.0  1.0]
>     [ 1.5 -0.5]

Enlagring the tolerance for catching the correct result instead of
taking this correct result as the centered expectation looks like an odd
fix !

Ciao,
Thierry



On Tue, Nov 04, 2014 at 05:15:29PM +0000, John Cremona wrote:
> On 4 November 2014 15:42, Volker Braun <[email protected]> wrote:
> > Do you get any failures with #17278?
> >
> 
> 2 pass, 1 still fails:
> 
> File "src/sage/tests/french_book/linsolve_doctest.py", line 51, in
> sage.tests.french_book.linsolve_doctest
> Failed example:
>     x = A\b; x  # rel tol 1e-15
> Expected:
>     (-0.20000000000000018, 0.9000000000000001)
> Got:
>     (-0.19999999999999987, 0.8999999999999999)
> Tolerance exceeded in 1 of 2:
>     -0.20000000000000018 vs -0.19999999999999987, tolerance 2e-15 > 1e-15
> 
> John
> 
> >
> > On Tuesday, November 4, 2014 1:58:34 PM UTC, Jean-Pierre Flori wrote:
> >>
> >>
> >>
> >> On Tuesday, November 4, 2014 2:16:43 PM UTC+1, John Cremona wrote:
> >>>
> >>> It's a long time since I have done a "make ptestlong" and not had
> >>> several test failures.  I have done "make distclean" first and have
> >>> pulled the latest develop branch (commit
> >>> 8b95db32005c62e289d6698e8233218d5fda0f60) but see this:
> >>>
> >>> sage -t --long src/sage/matrix/matrix_double_dense.pyx  # 1 doctest
> >>> failed
> >>> sage -t --long src/sage/tests/french_book/linsolve_doctest.py  # 1
> >>> doctest failed
> >>> sage -t --long src/sage/matrix/matrix_real_double_dense.pyx  # 1 doctest
> >>> failed
> >>> sage -t --long src/sage/crypto/mq/sr.py  # Timed out
> >>>
> >>> where I think the first three are the usual suspects (for me).  The
> >>> last one was ok on a retry.  The others are
> >>>
> >>> File "src/sage/matrix/matrix_double_dense.pyx", line 87, in
> >>> sage.matrix.matrix_double_dense.
> >>> Matrix_double_dense
> >>> Failed example:
> >>>     m^(-1)
> >>> Expected:
> >>>     [-1.9999999999999996  0.9999999999999998]
> >>>     [ 1.4999999999999998 -0.4999999999999999]
> >>> Got:
> >>>     [-2.0  1.0]
> >>>     [ 1.5 -0.5]
> >>>
> >>> File "src/sage/tests/french_book/linsolve_doctest.py", line 51, in
> >>> sage.tests.french_book.li
> >>> nsolve_doctest
> >>> Failed example:
> >>>     x = A\b; x  # rel tol 1e-15
> >>> Expected:
> >>>     (-0.20000000000000018, 0.9000000000000001)
> >>> Got:
> >>>     (-0.19999999999999987, 0.8999999999999999)
> >>> Tolerance exceeded in 1 of 2:
> >>>     -0.20000000000000018 vs -0.19999999999999987, tolerance 2e-15 > 1e-15
> >>>
> >>> File "src/sage/matrix/matrix_real_double_dense.pyx", line 61, in
> >>> sage.matrix.matrix_real_dou
> >>> ble_dense.Matrix_real_double_dense
> >>> Failed example:
> >>>     n = m^(-1); n
> >>> Expected:
> >>>     [-1.9999999999999996  0.9999999999999998]
> >>>     [ 1.4999999999999998 -0.4999999999999999]
> >>> Got:
> >>>     [-2.0  1.0]
> >>>     [ 1.5 -0.5]
> >>>
> >>> which I am sure have been mentioned before, but I also thought they
> >>> had been fixed?
> >>>
> >> Were this specific ones mentonied?
> >> I know some were fixed in #17063, some in #17126, some in #17238 ...
> >> And with all of these merged, everything was fine with 6.4..rc0, but now I
> >> get new failing ones with 6.4.rc1 :)
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "sage-release" 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-release.
> > For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-release" 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-release.
> For more options, visit https://groups.google.com/d/optout.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-release" 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-release.
For more options, visit https://groups.google.com/d/optout.

Reply via email to