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

Commit

Permalink
Adapt CBF and RBF doctests to numerical noise
Browse files Browse the repository at this point in the history
  • Loading branch information
slel committed Nov 19, 2021
1 parent cc60cfe commit 859b7ba
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/sage/functions/gamma.py
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ def _method_arguments(self, x, y):
TESTS::
sage: RBF(beta(sin(3),sqrt(RBF(2).add_error(1e-8)/3)))
[7.407662 +/- 6.17e-7]
[7.40766... +/- ...e-...]
"""
return [x, y]

Expand Down
10 changes: 5 additions & 5 deletions src/sage/rings/complex_arb.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4190,7 +4190,7 @@ cdef class ComplexBall(RingElement):
TESTS:
sage: CBF(Ei(I))
[0.337403922900968 +/- 3.76e-16] + [2.51687939716208 +/- 2.01e-15]*I
[0.337403922900968 +/- ...e-16] + [2.51687939716208 +/- ...e-15]*I
"""
cdef ComplexBall result = self._new()
if _do_sig(prec(self)): sig_on()
Expand All @@ -4214,7 +4214,7 @@ cdef class ComplexBall(RingElement):
TESTS:
sage: CBF(Si(I))
[1.05725087537573 +/- 2.77e-15]*I
[1.05725087537573 +/- ...e-15]*I
"""
cdef ComplexBall result = self._new()
if _do_sig(prec(self)): sig_on()
Expand All @@ -4240,7 +4240,7 @@ cdef class ComplexBall(RingElement):
TESTS:
sage: CBF(Ci(I))
[0.837866940980208 +/- 4.72e-16] + [1.570796326794897 +/- 5.54e-16]*I
[0.837866940980208 +/- ...e-16] + [1.570796326794897 +/- ...e-16]*I
"""
cdef ComplexBall result = self._new()
if _do_sig(prec(self)): sig_on()
Expand All @@ -4266,7 +4266,7 @@ cdef class ComplexBall(RingElement):
TESTS:
sage: CBF(Shi(I))
[0.946083070367183 +/- 9.22e-16]*I
[0.946083070367183 +/- ...e-16]*I
"""
cdef ComplexBall result = self._new()
if _do_sig(prec(self)): sig_on()
Expand All @@ -4292,7 +4292,7 @@ cdef class ComplexBall(RingElement):
TESTS:
sage: CBF(Chi(I))
[0.337403922900968 +/- 3.25e-16] + [1.570796326794897 +/- 5.54e-16]*I
[0.337403922900968 +/- ...e-16] + [1.570796326794897 +/- ...e-16]*I
"""
cdef ComplexBall result = self._new()
if _do_sig(prec(self)): sig_on()
Expand Down
36 changes: 18 additions & 18 deletions src/sage/rings/real_arb.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3490,12 +3490,12 @@ cdef class RealBall(RingElement):
EXAMPLES::
sage: RBF(1).Ei()
[1.89511781635594 +/- 4.94e-15]
[1.89511781635594 +/- ...e-15]
TESTS::
sage: RBF(Ei(1))
[1.89511781635594 +/- 4.94e-15]
[1.89511781635594 +/- ...e-15]
"""
cdef RealBall res = self._new()
if _do_sig(prec(self)): sig_on()
Expand All @@ -3510,12 +3510,12 @@ cdef class RealBall(RingElement):
EXAMPLES::
sage: RBF(1).Si()
[0.946083070367183 +/- 9.22e-16]
[0.946083070367183 +/- ...e-16]
TESTS::
sage: RBF(Si(1))
[0.946083070367183 +/- 9.22e-16]
[0.946083070367183 +/- ...e-16]
"""
cdef RealBall res = self._new()
if _do_sig(prec(self)): sig_on()
Expand All @@ -3532,12 +3532,12 @@ cdef class RealBall(RingElement):
EXAMPLES::
sage: RBF(1).Ci()
[0.337403922900968 +/- 3.25e-16]
[0.337403922900968 +/- ...e-16]
TESTS::
sage: RBF(Ci(1))
[0.337403922900968 +/- 3.25e-16]
[0.337403922900968 +/- ...e-16]
"""
cdef RealBall res = self._new()
if _do_sig(prec(self)): sig_on()
Expand All @@ -3554,12 +3554,12 @@ cdef class RealBall(RingElement):
EXAMPLES::
sage: RBF(1).Shi()
[1.05725087537573 +/- 2.77e-15]
[1.05725087537573 +/- ...e-15]
TESTS::
sage: RBF(Shi(1))
[1.05725087537573 +/- 2.77e-15]
[1.05725087537573 +/- ...e-15]
"""
cdef RealBall res = self._new()
if _do_sig(prec(self)): sig_on()
Expand All @@ -3576,12 +3576,12 @@ cdef class RealBall(RingElement):
EXAMPLES::
sage: RBF(1).Chi()
[0.837866940980208 +/- 4.72e-16]
[0.837866940980208 +/- ...e-16]
TESTS::
sage: RBF(Chi(1))
[0.837866940980208 +/- 4.72e-16]
[0.837866940980208 +/- ...e-16]
"""
cdef RealBall res = self._new()
if _do_sig(prec(self)): sig_on()
Expand All @@ -3598,14 +3598,14 @@ cdef class RealBall(RingElement):
EXAMPLES::
sage: RBF(3).li()
[2.16358859466719 +/- 4.72e-15]
[2.16358859466719 +/- ...e-15]
TESTS::
sage: RBF(li(0))
0
sage: RBF(Li(0))
[-1.04516378011749 +/- 4.23e-15]
[-1.04516378011749 +/- ...e-15]
"""
cdef RealBall res = self._new()
if _do_sig(prec(self)): sig_on()
Expand All @@ -3622,7 +3622,7 @@ cdef class RealBall(RingElement):
EXAMPLES::
sage: RBF(3).Li()
[1.11842481454970 +/- 7.61e-15]
[1.11842481454970 +/- ...e-15]
"""
cdef RealBall res = self._new()
if _do_sig(prec(self)): sig_on()
Expand All @@ -3649,11 +3649,11 @@ cdef class RealBall(RingElement):
EXAMPLES::
sage: RBF(sin(3)).beta(RBF(2/3).sqrt())
[7.407661629415 +/- 1.07e-13]
[7.407661629415... +/- ...e-1...]
sage: RealBallField(100)(7/2).beta(1)
[0.28571428571428571428571428571 +/- 5.23e-30]
[0.28571428571428571428571428571 +/- ...e-30]
sage: RealBallField(100)(7/2).beta(1, 1/2)
[0.025253813613805268728601584361 +/- 2.53e-31]
[0.025253813613805268728601584361 +/- ...e-31]
.. TODO::
Expand Down Expand Up @@ -3686,9 +3686,9 @@ cdef class RealBall(RingElement):
sage: RBF(1/2).gamma()
[1.772453850905516 +/- ...e-16]
sage: RBF(gamma(3/2, RBF(2).sqrt()))
[0.37118875695353 +/- 3.00e-15]
[0.37118875695353 +/- ...e-15]
sage: RBF(3/2).gamma_inc(RBF(2).sqrt())
[0.37118875695353 +/- 3.00e-15]
[0.37118875695353 +/- ...e-15]
.. SEEALSO::
:meth:`~sage.rings.real_arb.RealBallField.gamma`
Expand Down
2 changes: 1 addition & 1 deletion src/sage/symbolic/function.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ cdef class Function(SageObject):
sage: airy_ai(b)
airy_ai([1.500000000 +/- 1.01e-10])
sage: gamma(b, 1)
[0.50728223 +/- 4.67e-9]
[0.50728223... +/- ...e-...]
sage: hurwitz_zeta(b, b)
hurwitz_zeta([1.500000000 +/- 1.01e-10], [1.500000000 +/- 1.01e-10])
sage: hurwitz_zeta(1/2, b)
Expand Down

0 comments on commit 859b7ba

Please sign in to comment.