Skip to content

Commit

Permalink
src/sage/functions/special.py: Use 'abs tol' instead of 'tol' in two …
Browse files Browse the repository at this point in the history
…examples
  • Loading branch information
Matthias Koeppe committed Nov 18, 2023
1 parent 70492f2 commit 044f6c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sage/functions/special.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def __init__(self):
Check that :trac:`34085` is fixed::
sage: _ = var("x y") # needs sage.symbolic
sage: fricas(elliptic_e(x, y)) # optional - fricas, needs sage.symbolic
sage: fricas(elliptic_e(x, y)) # optional - fricas, needs sage.symbolic
ellipticE(sin(x),y)
However, the conversion is only correct in the interval
Expand All @@ -525,7 +525,7 @@ def __init__(self):
sage: f = lambda x, y: elliptic_e(arcsin(x), y).subs(x=x, y=y)
sage: g = lambda x, y: fricas.ellipticE(x, y).sage()
sage: d = lambda x, y: f(x, y) - g(x, y)
sage: [d(N(-pi/2 + x), y) # tol 1e-8 # optional - fricas, needs sage.symbolic
sage: [d(N(-pi/2 + x), y) # abs tol 1e-8 # optional - fricas, needs sage.symbolic
....: for x in range(1, 3) for y in range(-2, 2)]
[0.000000000000000,
0.000000000000000,
Expand Down Expand Up @@ -877,7 +877,7 @@ def __init__(self):
Check that :trac:`34186` is fixed::
sage: _ = var("x y") # needs sage.symbolic
sage: fricas(elliptic_f(x, y)) # optional - fricas, needs sage.symbolic
sage: fricas(elliptic_f(x, y)) # optional - fricas, needs sage.symbolic
ellipticF(sin(x),y)
However, the conversion is only correct in the interval
Expand All @@ -891,7 +891,7 @@ def __init__(self):
sage: f = lambda x, y: elliptic_f(arcsin(x), y).subs(x=x, y=y)
sage: g = lambda x, y: fricas.ellipticF(x, y).sage()
sage: d = lambda x, y: f(x, y) - g(x, y)
sage: [d(N(-pi/2 + x), y) # tol 1e-8 # optional - fricas, needs sage.symbolic
sage: [d(N(-pi/2 + x), y) # abs tol 1e-8 # optional - fricas, needs sage.symbolic
....: for x in range(1, 3) for y in range(-2,2)]
[0.000000000000000,
0.000000000000000,
Expand Down

0 comments on commit 044f6c1

Please sign in to comment.