void-packages/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
2022-02-03 14:31:06 +01:00

126 lines
3.9 KiB
Diff

From 24cc94b1988a90f3bd22a2368ec30c086283af13 Mon Sep 17 00:00:00 2001
From: Antonio Rojas <arojas@archlinux.org>
Date: Sun, 16 Jan 2022 11:55:04 +0100
Subject: Add abs tol to some arb tests
---
src/sage/functions/error.py | 2 +-
src/sage/rings/complex_arb.pyx | 6 +++---
src/sage/rings/real_arb.pyx | 10 +++++-----
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/sage/functions/error.py b/src/sage/functions/error.py
index f48d04f..06f0b24 100644
--- a/src/sage/functions/error.py
+++ b/src/sage/functions/error.py
@@ -267,7 +267,7 @@ class Function_erf(BuiltinFunction):
Check that real ball evaluation is fixed :trac:`28061`::
- sage: RealBallField(128)(erf(5))
+ sage: RealBallField(128)(erf(5)) # abs tol 1e-38
[0.99999999999846254020557196514981165651 +/- 7.33e-39]
"""
R = parent or s_parent(x)
diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx
index f986970..93ff565 100644
--- a/src/sage/rings/complex_arb.pyx
+++ b/src/sage/rings/complex_arb.pyx
@@ -3974,8 +3974,8 @@ cdef class ComplexBall(RingElement):
EXAMPLES::
- sage: CBF(20).erfc()
- [5.39586561160790e-176 +/- ...e-191]
+ sage: CBF(20).erfc() # abs tol 1e-190
+ [5.39586561160790e-176 +/- 6.73e-191]
sage: CBF(100, 100).erfc()
[0.00065234366376858 +/- ...e-18] + [-0.00393572636292141 +/- ...e-18]*I
"""
@@ -4280,7 +4280,7 @@ cdef class ComplexBall(RingElement):
TESTS:
- sage: CBF(Shi(I))
+ sage: CBF(Shi(I)) # abs tol 1e-15
[0.946083070367183 +/- 9.22e-16]*I
"""
cdef ComplexBall result = self._new()
diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
index 4a81784..292bfea 100644
--- a/src/sage/rings/real_arb.pyx
+++ b/src/sage/rings/real_arb.pyx
@@ -3506,7 +3506,7 @@ cdef class RealBall(RingElement):
EXAMPLES::
- sage: RBF(1/2).erf()
+ sage: RBF(1/2).erf() # abs tol 1e-16
[0.520499877813047 +/- 6.10e-16]
"""
cdef RealBall res = self._new()
@@ -3556,12 +3556,12 @@ cdef class RealBall(RingElement):
EXAMPLES::
- sage: RBF(1).Si()
+ sage: RBF(1).Si() # abs tol 1e-15
[0.946083070367183 +/- 9.22e-16]
TESTS::
- sage: RBF(Si(1))
+ sage: RBF(Si(1)) # abs tol 1e-15
[0.946083070367183 +/- 9.22e-16]
"""
cdef RealBall res = self._new()
@@ -3578,12 +3578,12 @@ cdef class RealBall(RingElement):
EXAMPLES::
- sage: RBF(1).Ci() # abs tol 1e-16
+ sage: RBF(1).Ci() # abs tol 1e-15
[0.337403922900968 +/- 3.25e-16]
TESTS::
- sage: RBF(Ci(1)) # abs tol 1e-16
+ sage: RBF(Ci(1)) # abs tol 1e-15
[0.337403922900968 +/- 3.25e-16]
"""
cdef RealBall res = self._new()
--
cgit v1.0-1-gd88e
From 53532ddd4e2dc92469c1590ebf0c40f8f69bf579 Mon Sep 17 00:00:00 2001
From: Antonio Rojas <arojas@archlinux.org>
Date: Sun, 16 Jan 2022 14:16:53 +0100
Subject: Decrease abs tol
---
src/sage/rings/real_arb.pyx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
index 292bfea..eb30f7f 100644
--- a/src/sage/rings/real_arb.pyx
+++ b/src/sage/rings/real_arb.pyx
@@ -3578,12 +3578,12 @@ cdef class RealBall(RingElement):
EXAMPLES::
- sage: RBF(1).Ci() # abs tol 1e-15
+ sage: RBF(1).Ci() # abs tol 5e-16
[0.337403922900968 +/- 3.25e-16]
TESTS::
- sage: RBF(Ci(1)) # abs tol 1e-15
+ sage: RBF(Ci(1)) # abs tol 5e-16
[0.337403922900968 +/- 3.25e-16]
"""
cdef RealBall res = self._new()
--
cgit v1.0-1-gd88e