11"""
22Elliptic Integrals
33
4- In integral calculus, an <url>:elliptic integral: https://en.wikipedia.org/wiki/Elliptic_integral</url> is one of a number of related functions defined as the value of certain integral. Their name originates from their originally arising in connection with the problem of finding the arc length of an ellipse. These functions often are used in cryptography to encode and decode messages.
4+ In integral calculus, an <url>:elliptic integral:
5+ https://en.wikipedia.org/wiki/Elliptic_integral</url> is one of a number of \
6+ related functions defined as the value of certain integral. Their name \
7+ originates from their originally arising in connection with the problem of \
8+ finding the arc length of an ellipse.
59
10+ These functions often are used in cryptography to encode and decode messages.
611"""
712
813import sympy
1722
1823class EllipticE (SympyFunction ):
1924 """
20- <url>:WMA link:https://reference.wolfram.com/language/ref/EllipticE.html</url>
25+ <url>
26+ :Elliptic complete elliptic integral of the second kind:
27+ https://en.wikipedia.org/wiki/Elliptic_integral#Complete_elliptic_integral_of_the_second_kind</url> (<url>:SymPy:
28+ https://docs.sympy.org/latest/modules/functions/special.html#sympy.functions.special.elliptic_integrals.elliptic_e</url>, <url>
29+ :WMA:
30+ https://reference.wolfram.com/language/ref/EllipticE.html</url>)
2131
2232 <dl>
2333 <dt>'EllipticE[$m$]'
@@ -46,19 +56,19 @@ class EllipticE(SympyFunction):
4656 summary_text = "elliptic integral of the second kind E(ϕ|m)"
4757 sympy_name = "elliptic_e"
4858
49- def apply_default (self , args , evaluation ):
59+ def eval_default (self , args , evaluation ):
5060 "%(name)s[args___]"
5161 evaluation .message ("EllipticE" , "argt" , Integer (len (args .elements )))
5262
53- def apply_m (self , m , evaluation ):
63+ def eval_m (self , m , evaluation ):
5464 "%(name)s[m_]"
5565 sympy_arg = numerify (m , evaluation ).to_sympy ()
5666 try :
5767 return from_sympy (sympy .elliptic_e (sympy_arg ))
5868 except :
5969 return
6070
61- def apply_phi_m (self , phi , m , evaluation ):
71+ def eval_phi_m (self , phi , m , evaluation ):
6272 "%(name)s[phi_, m_]"
6373 sympy_args = [numerify (a , evaluation ).to_sympy () for a in (phi , m )]
6474 try :
@@ -69,7 +79,12 @@ def apply_phi_m(self, phi, m, evaluation):
6979
7080class EllipticF (SympyFunction ):
7181 """
72- <url>:WMA link:https://reference.wolfram.com/language/ref/EllipticF.html</url>
82+ <url>
83+ :Complete elliptic integral of the first kind:
84+ https://en.wikipedia.org/wiki/Elliptic_integral#Complete_elliptic_integral_of_the_first_kind</url> (<url>:SymPy:
85+ https://docs.sympy.org/latest/modules/functions/special.html#sympy.functions.special.elliptic_integrals.elliptic_f</url>, <url>
86+ :WMA:
87+ https://reference.wolfram.com/language/ref/EllipticF.html</url>)
7388
7489 <dl>
7590 <dt>'EllipticF[$phi$, $m$]'
@@ -92,11 +107,11 @@ class EllipticF(SympyFunction):
92107 summary_text = "elliptic integral F(ϕ|m)"
93108 sympy_name = "elliptic_f"
94109
95- def apply_default (self , args , evaluation ):
110+ def eval_default (self , args , evaluation ):
96111 "%(name)s[args___]"
97112 evaluation .message ("EllipticE" , "argx" , Integer (len (args .elements )))
98113
99- def apply (self , phi , m , evaluation ):
114+ def eval (self , phi , m , evaluation ):
100115 "%(name)s[phi_, m_]"
101116 sympy_args = [numerify (a , evaluation ).to_sympy () for a in (phi , m )]
102117 try :
@@ -107,7 +122,12 @@ def apply(self, phi, m, evaluation):
107122
108123class EllipticK (SympyFunction ):
109124 """
110- <url>:WMA link:https://reference.wolfram.com/language/ref/EllipticK.html</url>
125+ <url>
126+ :Complete elliptic integral of the first kind:
127+ https://en.wikipedia.org/wiki/Elliptic_integral#Complete_elliptic_integral_of_the_first_kind</url> (<url>:SymPy:
128+ https://docs.sympy.org/latest/modules/functions/special.html</url>, <url>
129+ :WMA:
130+ https://reference.wolfram.com/language/ref/EllipticK.html</url>)
111131
112132 <dl>
113133 <dt>'EllipticK[$m$]'
@@ -128,16 +148,16 @@ class EllipticK(SympyFunction):
128148
129149 attributes = A_NUMERIC_FUNCTION | A_LISTABLE | A_PROTECTED
130150 messages = {
131- "argx" : "EllipticE called with `` arguments; 1 argument is expected." ,
151+ "argx" : "EllipticK called with `` arguments; 1 argument is expected." ,
132152 }
133153 summary_text = "elliptic integral of the first kind K(m)"
134154 sympy_name = "elliptic_k"
135155
136- def apply_default (self , args , evaluation ):
156+ def eval_default (self , args , evaluation ):
137157 "%(name)s[args___]"
138158 evaluation .message ("EllipticK" , "argx" , Integer (len (args .elements )))
139159
140- def apply (self , m , evaluation ):
160+ def eval (self , m , evaluation ):
141161 "%(name)s[m_]"
142162 args = numerify (m , evaluation ).get_sequence ()
143163 sympy_args = [a .to_sympy () for a in args ]
@@ -149,7 +169,12 @@ def apply(self, m, evaluation):
149169
150170class EllipticPi (SympyFunction ):
151171 """
152- <url>:WMA link:https://reference.wolfram.com/language/ref/EllipticPi.html</url>
172+ <url>
173+ :Complete elliptic integral of the third kind:
174+ https://en.wikipedia.org/wiki/Elliptic_integral#Incomplete_elliptic_integral_of_the_third_kind</url> (<url>:SymPy:
175+ https://docs.sympy.org/latest/modules/functions/special.html#sympy.functions.special.elliptic_integrals.elliptic_pi</url>, <url>
176+ :WMA:
177+ https://reference.wolfram.com/language/ref/EllipticPi.html</url>)
153178
154179 <dl>
155180 <dt>'EllipticPi[$n$, $m$]'
@@ -172,11 +197,11 @@ class EllipticPi(SympyFunction):
172197 summary_text = "elliptic integral of the third kind P(n|m)"
173198 sympy_name = "elliptic_pi"
174199
175- def apply_default (self , args , evaluation ):
200+ def eval_default (self , args , evaluation ):
176201 "%(name)s[args___]"
177202 evaluation .message ("EllipticPi" , "argt" , Integer (len (args .elements )))
178203
179- def apply_n_m (self , n , m , evaluation ):
204+ def eval_n_m (self , n , m , evaluation ):
180205 "%(name)s[n_, m_]"
181206 sympy_m = to_numeric_sympy_args (m , evaluation )[0 ]
182207 sympy_n = to_numeric_sympy_args (n , evaluation )[0 ]
@@ -185,7 +210,7 @@ def apply_n_m(self, n, m, evaluation):
185210 except :
186211 return
187212
188- def apply_n_phi_m (self , n , phi , m , evaluation ):
213+ def eval_n_phi_m (self , n , phi , m , evaluation ):
189214 "%(name)s[n_, phi_, m_]"
190215 sympy_n = to_numeric_sympy_args (n , evaluation )[0 ]
191216 sympy_phi = to_numeric_sympy_args (m , evaluation )[0 ]
0 commit comments