Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
doctest fixes
Browse files Browse the repository at this point in the history
some of them are changes of format of printing numbers such
as 0.xyzE-t - now they print as x.yzE-(t+1)

some are slight precision loss in the last digit
  • Loading branch information
dimpase committed Jun 3, 2020
1 parent 0076bc3 commit 1d074e8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/sage/interfaces/interface.py
Expand Up @@ -589,9 +589,9 @@ def function_call(self, function, args=None, kwds=None):
EXAMPLES::
sage: maxima.quad_qags(x, x, 0, 1, epsrel=1e-4)
[0.5,0.55511151231257...e-14,21,0]
[0.5,5.5511151231257...e-15,21,0]
sage: maxima.function_call('quad_qags', [x, x, 0, 1], {'epsrel':'1e-4'})
[0.5,0.55511151231257...e-14,21,0]
[0.5,5.5511151231257...e-15,21,0]
"""
args, kwds = self._convert_args_kwds(args, kwds)
self._check_valid_function_name(function)
Expand Down
4 changes: 2 additions & 2 deletions src/sage/interfaces/maxima.py
Expand Up @@ -128,9 +128,9 @@
sage: a = maxima('(1 + sqrt(2))^5')
sage: float(a)
82.01219330881975
82.0121933088197...
sage: a.numer()
82.01219330881975
82.0121933088197...
::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/maxima_abstract.py
Expand Up @@ -1518,7 +1518,7 @@ def nintegral(self, var='x', a=0, b=1,
EXAMPLES::
sage: maxima('exp(-sqrt(x))').nintegral('x',0,1)
(0.5284822353142306, 0.41633141378838...e-10, 231, 0)
(0.5284822353142306, 4.1633141378838...e-11, 231, 0)
Note that GP also does numerical integration, and can do so to very
high precision very quickly::
Expand Down
4 changes: 2 additions & 2 deletions src/sage/interfaces/tests.py
Expand Up @@ -31,8 +31,8 @@
....: except IOError:
....: f = open('/dev/null', 'w')
sage: kwds = dict(shell=True, stdout=f, stderr=f)
sage: subprocess.call("echo syntax error | ecl", **kwds)
0
sage: subprocess.call("echo syntax error | ecl", **kwds) in (0, 255)
True
sage: subprocess.call("echo syntax error | gap", **kwds) in (0, 1)
True
sage: subprocess.call("echo syntax error | gp", **kwds)
Expand Down

0 comments on commit 1d074e8

Please sign in to comment.