Skip to content

Commit 52ffb4d

Browse files
authored
Merge pull request #73 from nschloe/gudermannian
add gudermannian
2 parents fdcf8eb + 2178dfe commit 52ffb4d

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/PyCQA/isort
3-
rev: 5.11.2
3+
rev: 5.11.4
44
hooks:
55
- id: isort
66

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ All plots are created with default settings.
188188
| :------------------------------------------------------------------------: | :------------------------------------------------------------: | :--------------------------------------------------------------------: |
189189
| [Integral sine _Si_](https://en.wikipedia.org/wiki/Trigonometric_integral) | Integral cosine _Ci_ | [Lambert W function](https://en.wikipedia.org/wiki/Lambert_W_function) |
190190

191+
| <img src="https://nschloe.github.io/cplot/gudermannian.png" width="70%"> | <img src="https://nschloe.github.io/cplot/exp1.png" width="70%"> | <img src="https://nschloe.github.io/cplot/expi.png" width="70%"> |
192+
| :--------------------------------------------------------------------------: | :--------------------------------------------------------------: | :--------------------------------------------------------------: |
193+
| [Gudermannian function](https://en.wikipedia.org/wiki/Gudermannian_function) | Exponential integral E1 | Exponential integral Ei |
194+
191195
| <img src="https://nschloe.github.io/cplot/zeta.png" width="70%"> | <img src="https://nschloe.github.io/cplot/bernoulli.png" width="70%"> | <img src="https://nschloe.github.io/cplot/dirichlet-eta.png" width="70%"> |
192196
| :------------------------------------------------------------------: | :-------------------------------------------------------------------: | :----------------------------------------------------------------------------: |
193197
| [`mpmath.zeta`](https://en.wikipedia.org/wiki/Riemann_zeta_function) | Bernoulli function | [Dirichlet eta function](https://en.wikipedia.org/wiki/Dirichlet_eta_function) |

tests/generate-readme-figures.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ def hurwitz_zeta(s, a):
6565
return np.reshape(out, s.shape)
6666

6767

68+
def gudermannian(z):
69+
return 2 * np.arctan(np.tanh(0.5 * z))
70+
71+
72+
def gudermannian_inv(z):
73+
return 2 * np.arctanh(np.tan(0.5 * z))
74+
75+
6876
def hurwitz_zeta_a(s, a):
6977
"""
7078
Like hurwitz_zeta(), but with the vectorization in the second component.
@@ -292,10 +300,13 @@ def bernoulli(z):
292300
#
293301
("si.png", lambda z: sici(z)[0], (-15, +15), (-15, +15)),
294302
("ci.png", lambda z: sici(z)[1], (-15, +15), (-15, +15)),
295-
("expi.png", expi, (-15, +15), (-15, +15)),
303+
("lambertw.png", lambertw, (-5, +5), (-5, +5)),
304+
#
296305
#
306+
("gudermannian.png", gudermannian, (-10, 10), (-10, 10)),
307+
# ("gudermannian_inv.png", gudermannian_inv, (-2, 2), (-2, 2)),
297308
("exp1.png", exp1, (-5, +5), (-5, +5)),
298-
("lambertw.png", lambertw, (-5, +5), (-5, +5)),
309+
("expi.png", expi, (-15, +15), (-15, +15)),
299310
#
300311
("zeta.png", zeta, (-30, +30), (-30, +30)),
301312
("bernoulli.png", bernoulli, (-30, +30), (-30, +30)),

0 commit comments

Comments
 (0)