Hello,
What if we introduce a "# numeric 1e-10" doctest flag (like
#optional, etc.) that does just that---reads in the doctest answer, gets the
output of the function, and does an abs(actual-expected)< epsilon (where
epsilon can be specified in the flag, or it has a default).

sage: some_numerical_function() # numeric 1e-6
3.43234454

passes if abs(real result-3.43234454)<1e-6
A very fine idea.

Or replace the ... by #[relative|absolute]<epsilon> in the result (not on the input line)

The doctest becomes :
"""
sage: gamma(6.0)
120.000#relative_error=1.0e-6
""""

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to