1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
--- gsl_sf_ellint.pd_orig 2015-11-15 10:46:20 +1100
+++ gsl_sf_ellint.pd 2015-11-15 10:54:47 +1100
@@ -82,6 +82,10 @@
Doc =>'Legendre form of incomplete elliptic integrals P(phi,k,n) = Integral[(1 + n Sin[t]^2)^(-1)/Sqrt[1 - k^2 Sin[t]^2], {t, 0, phi}]'
);
+my $v = `gsl-config --version`;
+
+if($v < 2.0) {
+
pp_def('gsl_sf_ellint_D',
GenericTypes => [D],
Pars=>'double phi(); double k(); double n();
@@ -95,6 +99,24 @@
Doc =>'Legendre form of incomplete elliptic integrals D(phi,k,n)'
);
+}
+else {
+
+pp_def('gsl_sf_ellint_D',
+ GenericTypes => [D],
+ Pars=>'double phi(); double k();
+ double [o]y(); double [o]e()',
+ Code =>'
+gsl_sf_result r;
+GSLERR(gsl_sf_ellint_D_e,($phi(),$k(),GSL_PREC_DOUBLE,&r))
+$y() = r.val;
+$e() = r.err;
+',
+ Doc =>'Legendre form of incomplete elliptic integrals D(phi,k)'
+ );
+
+}
+
pp_def('gsl_sf_ellint_RC',
GenericTypes => [D],
Pars=>'double x(); double yy(); double [o]y(); double [o]e()',
|