Skip to content

Commit ec5dd08

Browse files
authored
Add more DMLF links and example plots (#1373)
1 parent ba90dfa commit ec5dd08

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

mathics/builtin/specialfns/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
66
There are a number of functions found in mathematical physics and found in standard handbooks.
77
8-
One thing to note is that the technical literature often contains several conflicting definitions. So beware and check for conformance with the Mathics documentation.
8+
One good source is <url>
9+
:The NIST Digital Library of Mathematical Functions:
10+
https://dlmf.nist.gov/</url>.
11+
12+
The technical literature often contains several conflicting definitions. So beware, and check for conformance with the Mathics3 documentation.
913
1014
A number of special functions can be evaluated for arbitrary complex values of their arguments. However defining relations may apply only for some special choices of arguments. Here, the full function corresponds to an extension or "analytic continuation" of the defining relation.
1115

mathics/builtin/specialfns/expintegral.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
"""
44
Exponential Integral and Special Functions
5+
6+
See also <url>
7+
:Chapters 4.2-4.13 Logarithm, Exponential, Powers in the Digital Libary of Mathematical Functions:
8+
https://dlmf.nist.gov/4#PT2</url>.
59
"""
610

711

mathics/builtin/specialfns/orthogonal.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
"""
22
Orthogonal Polynomials
3+
4+
See also <url>
5+
:Chapters 18.3 Classical Orthogonal Polynomials in the Digital Libary of Mathematical Functions:
6+
https://dlmf.nist.gov/18.3</url>.
37
"""
48

59

mathics/builtin/specialfns/zeta.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
"""
44
Zeta Functions and Polylogarithms
5+
6+
See also <url>
7+
:Chapters 25 Zeta and Related Functions in the Digital Libary of Mathematical Functions:
8+
https://dlmf.nist.gov/25</url>.
59
"""
610

711
import mpmath
@@ -34,8 +38,13 @@ class LerchPhi(MPMathFunction):
3438
>> LerchPhi[2, 3, -1.5]
3539
= 19.3893 - 2.1346 I
3640
37-
>> LerchPhi[1, 2, 1/4]
38-
= 17.1973
41+
>> LerchPhi[1, 2, 1/4] == 8 Catalan + Pi^2
42+
= True
43+
44+
Plot between between -1 and 1:
45+
>> Plot[LerchPhi[x, 1, 2], {x, -1, 1}]
46+
= -Graphics-
47+
3948
"""
4049

4150
attributes = A_LISTABLE | A_NUMERIC_FUNCTION | A_PROTECTED | A_READ_PROTECTED
@@ -72,6 +81,10 @@ class PolyLog(MPMathFunction):
7281
= Zeta[s]
7382
>> PolyLog[-7, I] //Chop
7483
= 136.
84+
85+
Dilogarithm function $Li_2(x)$:
86+
>> Plot[PolyLog[2,x], {x, -20, 1}]
87+
= -Graphics-
7588
"""
7689

7790
attributes = A_LISTABLE | A_NUMERIC_FUNCTION | A_PROTECTED | A_READ_PROTECTED
@@ -103,6 +116,9 @@ class Zeta(MPMathFunction):
103116
104117
>> Zeta[-2.5 + I]
105118
= 0.0235936 + 0.0014078 I
119+
120+
>> Plot[Zeta[z], {z, -20, 10}]
121+
= -Graphics-
106122
"""
107123

108124
attributes = A_LISTABLE | A_NUMERIC_FUNCTION | A_PROTECTED | A_READ_PROTECTED

0 commit comments

Comments
 (0)