# HG changeset patch
# User Robert Bradshaw
# Date 1300429758 25200
# Node ID 029709447b87db93acff1746b570dd975ff12433
# Parent f3b747f7e8d78cd69ddaf9c7ce6509f0f6ceb607
#10952 - better handling of numerial noise in doctests
diff -r f3b747f7e8d7 -r 029709447b87 doc/en/developer/conventions.rst
--- a/doc/en/developer/conventions.rst Fri Mar 04 00:34:43 2011 -0800
+++ b/doc/en/developer/conventions.rst Thu Mar 17 23:29:18 2011 -0700
@@ -723,6 +723,22 @@
sage: E.regulator() # long time (1 second)
0.0511114082399688
+- If a line contains ``tol`` or ``tolerance, numerical results are only
+ verified to the given tolerance. This may be prefixed by ``abs[olute``
+ or ``rel[ative]`` to specify whether to measure absolute or relative
+ error; defaults to relative error except when the expected value is
+ exactly zero:
+
+ ::
+
+ sage: RDF(pi) # abs tol 1e-5
+ 3.14159
+ sage: [10^n for n in [0.0 .. 4]] # rel tol 2e-4
+ [0.9999, 10.001, 100.01, 999.9, 10001]
+
+ This can be useful when the exact output is subject to rounding error
+ and/or processor floating point arithmetic variation.
+
- If a line contains ``todo: not implemented``, it is never
tested. It is good to include lines like this to make clear what we
want Sage to eventually implement: