26 #if defined (HAVE_CONFIG_H)
134 double zr = z.real ();
135 double zi = z.imag ();
141 F77_FUNC (
zairy, ZAIRY) (zr, zi, id, sc, ar, ai, nz, t_ierr);
145 if (zi == 0.0 && (! scaled || zr >= 0.0))
148 return bessel_return_value (
Complex (ar, ai),
ierr);
164 retval(i, j) =
airy (z(i, j), deriv, scaled,
ierr(i, j));
180 retval(i) =
airy (z(i), deriv, scaled,
ierr(i));
200 float ar = a.real ();
201 float ai = a.imag ();
203 if (z.imag () == 0.0 && (! scaled || z.real () >= 0.0))
222 retval(i, j) =
airy (z(i, j), deriv, scaled,
ierr(i, j));
238 retval(i) =
airy (z(i), deriv, scaled,
ierr(i));
244 is_integer_value (
double x)
246 return x ==
static_cast<double> (
static_cast<long> (
x));
279 double zr = z.real ();
280 double zi = z.imag ();
282 F77_FUNC (
zbesj, ZBESJ) (zr, zi, alpha, kode, 1, &yr, &yi, nz, t_ierr);
286 if (zi == 0.0 && zr >= 0.0)
289 retval = bessel_return_value (
Complex (yr, yi),
ierr);
291 else if (is_integer_value (alpha))
296 if ((
static_cast<long> (alpha)) & 1)
298 retval = bessel_return_value (tmp,
ierr);
308 tmp -= sin (M_PI * alpha) *
zbesy (z, alpha, kode,
ierr);
310 retval = bessel_return_value (tmp,
ierr);
334 double zr = z.real ();
335 double zi = z.imag ();
339 if (zr == 0.0 && zi == 0.0)
346 F77_FUNC (
zbesy, ZBESY) (zr, zi, alpha, kode, 1, &yr, &yi, nz,
351 if (zi == 0.0 && zr >= 0.0)
355 return bessel_return_value (
Complex (yr, yi),
ierr);
357 else if (is_integer_value (alpha - 0.5))
362 if ((
static_cast<long> (alpha - 0.5)) & 1)
364 retval = bessel_return_value (tmp,
ierr);
374 tmp += sin (M_PI * alpha) *
zbesj (z, alpha, kode,
ierr);
376 retval = bessel_return_value (tmp,
ierr);
398 double zr = z.real ();
399 double zi = z.imag ();
401 F77_FUNC (
zbesi, ZBESI) (zr, zi, alpha, kode, 1, &yr, &yi, nz, t_ierr);
405 if (zi == 0.0 && zr >= 0.0)
408 retval = bessel_return_value (
Complex (yr, yi),
ierr);
410 else if (is_integer_value (alpha))
415 retval = bessel_return_value (tmp,
ierr);
425 Complex tmp2 = (2.0 / M_PI) * sin (M_PI * alpha)
431 tmp2 *= exp (-z - std::abs (z.real ()));
436 retval = bessel_return_value (tmp,
ierr);
458 double zr = z.real ();
459 double zi = z.imag ();
463 if (zr == 0.0 && zi == 0.0)
470 F77_FUNC (
zbesk, ZBESK) (zr, zi, alpha, kode, 1, &yr, &yi, nz,
475 if (zi == 0.0 && zr >= 0.0)
479 retval = bessel_return_value (
Complex (yr, yi),
ierr);
485 retval = bessel_return_value (tmp,
ierr);
503 double zr = z.real ();
504 double zi = z.imag ();
506 F77_FUNC (
zbesh, ZBESH) (zr, zi, alpha, kode, 1, 1, &yr, &yi, nz,
511 retval = bessel_return_value (
Complex (yr, yi),
ierr);
519 Complex tmp = exp (M_PI * alpha * eye) * zbesh1 (z, alpha, kode,
ierr);
521 retval = bessel_return_value (tmp,
ierr);
539 double zr = z.real ();
540 double zi = z.imag ();
542 F77_FUNC (
zbesh, ZBESH) (zr, zi, alpha, kode, 2, 1, &yr, &yi, nz,
547 retval = bessel_return_value (
Complex (yr, yi),
ierr);
555 Complex tmp = exp (-M_PI * alpha * eye) * zbesh2 (z, alpha, kode,
ierr);
557 retval = bessel_return_value (tmp,
ierr);
571 retval =
f (
x, alpha, (scaled ? 2 : 1),
ierr);
589 retval(i, j) =
f (
x(i, j), alpha, (scaled ? 2 : 1),
ierr(i, j));
607 retval(i, j) =
f (
x, alpha(i, j), (scaled ? 2 : 1),
ierr(i, j));
624 if (x_nr != alpha_nr || x_nc != alpha_nc)
625 (*current_liboctave_error_handler)
626 (
"%s: the sizes of alpha and x must conform", fn);
637 retval(i, j) =
f (
x(i, j), alpha(i, j), (scaled ? 2 : 1),
ierr(i, j));
653 retval(i) =
f (
x(i), alpha, (scaled ? 2 : 1),
ierr(i));
669 retval(i) =
f (
x, alpha(i), (scaled ? 2 : 1),
ierr(i));
681 if (dv != alpha.
dims ())
682 (*current_liboctave_error_handler)
683 (
"%s: the sizes of alpha and x must conform", fn);
691 retval(i) =
f (
x(i), alpha(i), (scaled ? 2 : 1),
ierr(i));
710 retval(i, j) =
f (
x(i), alpha(j), (scaled ? 2 : 1),
ierr(i, j));
715 #define SS_BESSEL(name, fcn) \
717 name (double alpha, const Complex& x, bool scaled, octave_idx_type& ierr) \
719 return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
722 #define SM_BESSEL(name, fcn) \
724 name (double alpha, const ComplexMatrix& x, bool scaled, \
725 Array<octave_idx_type>& ierr) \
727 return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
730 #define MS_BESSEL(name, fcn) \
732 name (const Matrix& alpha, const Complex& x, bool scaled, \
733 Array<octave_idx_type>& ierr) \
735 return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
738 #define MM_BESSEL(name, fcn) \
740 name (const Matrix& alpha, const ComplexMatrix& x, bool scaled, \
741 Array<octave_idx_type>& ierr) \
743 return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
746 #define SN_BESSEL(name, fcn) \
748 name (double alpha, const ComplexNDArray& x, bool scaled, \
749 Array<octave_idx_type>& ierr) \
751 return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
754 #define NS_BESSEL(name, fcn) \
756 name (const NDArray& alpha, const Complex& x, bool scaled, \
757 Array<octave_idx_type>& ierr) \
759 return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
762 #define NN_BESSEL(name, fcn) \
764 name (const NDArray& alpha, const ComplexNDArray& x, bool scaled, \
765 Array<octave_idx_type>& ierr) \
767 return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
770 #define RC_BESSEL(name, fcn) \
772 name (const RowVector& alpha, const ComplexColumnVector& x, bool scaled, \
773 Array<octave_idx_type>& ierr) \
775 return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
778 #define ALL_BESSEL(name, fcn) \
779 SS_BESSEL (name, fcn) \
780 SM_BESSEL (name, fcn) \
781 MS_BESSEL (name, fcn) \
782 MM_BESSEL (name, fcn) \
783 SN_BESSEL (name, fcn) \
784 NS_BESSEL (name, fcn) \
785 NN_BESSEL (name, fcn) \
786 RC_BESSEL (name, fcn)
824 is_integer_value (
float x)
826 return x ==
static_cast<float> (
static_cast<long> (
x));
845 if (z.imag () == 0.0 && z.real () >= 0.0)
848 retval = bessel_return_value (y,
ierr);
850 else if (is_integer_value (alpha))
855 if ((
static_cast<long> (alpha)) & 1)
857 retval = bessel_return_value (tmp,
ierr);
863 FloatComplex tmp = cosf (
static_cast<float> (M_PI) * alpha)
868 tmp -= sinf (
static_cast<float> (M_PI) * alpha)
871 retval = bessel_return_value (tmp,
ierr);
896 if (z.real () == 0.0 && z.imag () == 0.0)
908 if (z.imag () == 0.0 && z.real () >= 0.0)
912 return bessel_return_value (y,
ierr);
914 else if (is_integer_value (alpha - 0.5))
919 if ((
static_cast<long> (alpha - 0.5)) & 1)
921 retval = bessel_return_value (tmp,
ierr);
927 FloatComplex tmp = cosf (
static_cast<float> (M_PI) * alpha)
932 tmp += sinf (
static_cast<float> (M_PI) * alpha)
935 retval = bessel_return_value (tmp,
ierr);
961 if (z.imag () == 0.0 && z.real () >= 0.0)
964 retval = bessel_return_value (y,
ierr);
975 * sinf (
static_cast<float> (M_PI) * alpha)
981 tmp2 *= exp (-z - std::abs (z.real ()));
986 retval = bessel_return_value (tmp,
ierr);
1009 if (z.real () == 0.0 && z.imag () == 0.0)
1020 if (z.imag () == 0.0 && z.real () >= 0.0)
1024 retval = bessel_return_value (y,
ierr);
1030 retval = bessel_return_value (tmp,
ierr);
1052 retval = bessel_return_value (y,
ierr);
1060 FloatComplex tmp = exp (
static_cast<float> (M_PI) * alpha * eye)
1061 * cbesh1 (z, alpha, kode,
ierr);
1063 retval = bessel_return_value (tmp,
ierr);
1085 retval = bessel_return_value (y,
ierr);
1093 FloatComplex tmp = exp (-
static_cast<float> (M_PI) * alpha * eye)
1094 * cbesh2 (z, alpha, kode,
ierr);
1096 retval = bessel_return_value (tmp,
ierr);
1111 retval =
f (
x, alpha, (scaled ? 2 : 1),
ierr);
1129 retval(i, j) =
f (
x(i, j), alpha, (scaled ? 2 : 1),
ierr(i, j));
1148 retval(i, j) =
f (
x, alpha(i, j), (scaled ? 2 : 1),
ierr(i, j));
1166 if (x_nr != alpha_nr || x_nc != alpha_nc)
1167 (*current_liboctave_error_handler)
1168 (
"%s: the sizes of alpha and x must conform", fn);
1179 retval(i, j) =
f (
x(i, j), alpha(i, j), (scaled ? 2 : 1),
ierr(i, j));
1195 retval(i) =
f (
x(i), alpha, (scaled ? 2 : 1),
ierr(i));
1211 retval(i) =
f (
x, alpha(i), (scaled ? 2 : 1),
ierr(i));
1224 if (dv != alpha.
dims ())
1225 (*current_liboctave_error_handler)
1226 (
"%s: the sizes of alpha and x must conform", fn);
1234 retval(i) =
f (
x(i), alpha(i), (scaled ? 2 : 1),
ierr(i));
1253 retval(i, j) =
f (
x(i), alpha(j), (scaled ? 2 : 1),
ierr(i, j));
1258 #define SS_BESSEL(name, fcn) \
1260 name (float alpha, const FloatComplex& x, bool scaled, \
1261 octave_idx_type& ierr) \
1263 return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
1266 #define SM_BESSEL(name, fcn) \
1267 FloatComplexMatrix \
1268 name (float alpha, const FloatComplexMatrix& x, bool scaled, \
1269 Array<octave_idx_type>& ierr) \
1271 return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
1274 #define MS_BESSEL(name, fcn) \
1275 FloatComplexMatrix \
1276 name (const FloatMatrix& alpha, const FloatComplex& x, bool scaled, \
1277 Array<octave_idx_type>& ierr) \
1279 return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
1282 #define MM_BESSEL(name, fcn) \
1283 FloatComplexMatrix \
1284 name (const FloatMatrix& alpha, const FloatComplexMatrix& x, \
1285 bool scaled, Array<octave_idx_type>& ierr) \
1287 return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
1290 #define SN_BESSEL(name, fcn) \
1291 FloatComplexNDArray \
1292 name (float alpha, const FloatComplexNDArray& x, bool scaled, \
1293 Array<octave_idx_type>& ierr) \
1295 return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
1298 #define NS_BESSEL(name, fcn) \
1299 FloatComplexNDArray \
1300 name (const FloatNDArray& alpha, const FloatComplex& x, \
1301 bool scaled, Array<octave_idx_type>& ierr) \
1303 return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
1306 #define NN_BESSEL(name, fcn) \
1307 FloatComplexNDArray \
1308 name (const FloatNDArray& alpha, const FloatComplexNDArray& x, \
1309 bool scaled, Array<octave_idx_type>& ierr) \
1311 return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
1314 #define RC_BESSEL(name, fcn) \
1315 FloatComplexMatrix \
1316 name (const FloatRowVector& alpha, \
1317 const FloatComplexColumnVector& x, bool scaled, \
1318 Array<octave_idx_type>& ierr) \
1320 return do_bessel (fcn, #name, alpha, x, scaled, ierr); \
1323 #define ALL_BESSEL(name, fcn) \
1324 SS_BESSEL (name, fcn) \
1325 SM_BESSEL (name, fcn) \
1326 MS_BESSEL (name, fcn) \
1327 MM_BESSEL (name, fcn) \
1328 SN_BESSEL (name, fcn) \
1329 NS_BESSEL (name, fcn) \
1330 NN_BESSEL (name, fcn) \
1331 RC_BESSEL (name, fcn)
1356 double zr = z.real ();
1357 double zi = z.imag ();
1361 F77_INT sc = (scaled ? 2 : 1);
1367 if (zi == 0.0 && (! scaled || zr >= 0.0))
1370 return bessel_return_value (
Complex (ar, ai),
ierr);
1386 retval(i, j) =
biry (z(i, j), deriv, scaled,
ierr(i, j));
1402 retval(i) =
biry (z(i), deriv, scaled,
ierr(i));
1415 F77_INT sc = (scaled ? 2 : 1);
1422 float ar = a.real ();
1423 float ai = a.imag ();
1425 if (z.imag () == 0.0 && (! scaled || z.real () >= 0.0))
1444 retval(i, j) =
biry (z(i, j), deriv, scaled,
ierr(i, j));
1460 retval(i) =
biry (z(i), deriv, scaled,
ierr(i));
1487 ellipj (
double u,
double m,
double& sn,
double& cn,
double& dn,
double& err)
1489 static const int Nmax = 16;
1490 double m1, t=0, si_u, co_u, se_u, ta_u, b, c[Nmax], a[Nmax], phi;
1495 (*current_liboctave_warning_with_id_handler)
1496 (
"Octave:ellipj-invalid-m",
1497 "ellipj: invalid M value, required value 0 <= M <= 1");
1504 double sqrt_eps = std::sqrt (std::numeric_limits<double>::epsilon ());
1510 t = 0.25*
m*(u - si_u*co_u);
1511 sn = si_u - t * co_u;
1512 cn = co_u + t * si_u;
1513 dn = 1 - 0.5*
m*si_u*si_u;
1515 else if ((1 -
m) < sqrt_eps)
1523 sn = ta_u + 0.25*m1*(si_u*co_u - u)*se_u*se_u;
1524 cn = se_u - 0.25*m1*(si_u*co_u - u)*ta_u*se_u;
1525 dn = se_u + 0.25*m1*(si_u*co_u + u)*ta_u*se_u;
1532 b = std::sqrt (1 -
m);
1533 c[0] = std::sqrt (
m);
1534 for (
n = 1;
n < Nmax; ++
n)
1536 a[
n] = (a[
n - 1] + b)/2;
1537 c[
n] = (a[
n - 1] - b)/2;
1538 b = std::sqrt (a[
n - 1]*b);
1539 if (c[
n]/a[
n] < std::numeric_limits<double>::epsilon ())
break;
1547 for (ii = 1;
n > 0; ii *= 2, --
n) {}
1549 for (
n = Nn;
n > 0; --
n)
1551 phi = (
std::asin ((c[
n]/a[
n])* sin (phi)) + phi)/2;
1555 dn = std::sqrt (1 -
m*sn*sn);
1563 double m1 = 1 -
m, ss1, cc1, dd1;
1565 ellipj (u.imag (), m1, ss1, cc1, dd1, err);
1576 double ss, cc, dd, ddd;
1578 ellipj (u.real (),
m, ss, cc, dd, err);
1579 ddd = cc1*cc1 +
m*ss*ss*ss1*ss1;
1580 sn =
Complex (ss*dd1/ddd, cc*dd*ss1*cc1/ddd);
1581 cn =
Complex (cc*cc1/ddd, -ss*dd*ss1*dd1/ddd);
1582 dn =
Complex (dd*cc1*dd1/ddd, -
m*ss*cc*ss1/ddd);
1622 do_erfcinv (
double x,
bool refine)
1625 static const double a[] =
1627 -2.806989788730439e+01, 1.562324844726888e+02,
1628 -1.951109208597547e+02, 9.783370457507161e+01,
1629 -2.168328665628878e+01, 1.772453852905383e+00
1631 static const double b[] =
1633 -5.447609879822406e+01, 1.615858368580409e+02,
1634 -1.556989798598866e+02, 6.680131188771972e+01,
1635 -1.328068155288572e+01
1637 static const double c[] =
1639 -5.504751339936943e-03, -2.279687217114118e-01,
1640 -1.697592457770869e+00, -1.802933168781950e+00,
1641 3.093354679843505e+00, 2.077595676404383e+00
1643 static const double d[] =
1645 7.784695709041462e-03, 3.224671290700398e-01,
1646 2.445134137142996e+00, 3.754408661907416e+00
1649 static const double spi2 = 8.862269254527579e-01;
1650 static const double pbreak_lo = 0.04850;
1651 static const double pbreak_hi = 1.95150;
1655 if (
x >= pbreak_lo &&
x <= pbreak_hi)
1658 const double q = 0.5*(1-
x),
r = q*q;
1659 const double yn = (((((a[0]*
r + a[1])*
r + a[2])*
r + a[3])*
r + a[4])*
r + a[5])*q;
1660 const double yd = ((((b[0]*
r + b[1])*
r + b[2])*
r + b[3])*
r + b[4])*
r + 1.0;
1663 else if (
x > 0.0 &&
x < 2.0)
1666 const double q = (
x < 1
1667 ? std::sqrt (-2*std::log (0.5*
x))
1668 : std::sqrt (-2*std::log (0.5*(2-
x))));
1670 const double yn = ((((c[0]*q + c[1])*q + c[2])*q + c[3])*q + c[4])*q + c[5];
1672 const double yd = (((
d[0]*q +
d[1])*q +
d[2])*q +
d[3])*q + 1.0;
1689 double u = (
erf (y) - (1-
x)) * spi2 * exp (y*y);
1699 return do_erfcinv (
x,
true);
1705 return do_erfcinv (
x,
false);
1759 do_erfinv (
double x,
bool refine)
1762 static const double a[] =
1764 -2.806989788730439e+01, 1.562324844726888e+02,
1765 -1.951109208597547e+02, 9.783370457507161e+01,
1766 -2.168328665628878e+01, 1.772453852905383e+00
1768 static const double b[] =
1770 -5.447609879822406e+01, 1.615858368580409e+02,
1771 -1.556989798598866e+02, 6.680131188771972e+01,
1772 -1.328068155288572e+01
1774 static const double c[] =
1776 -5.504751339936943e-03, -2.279687217114118e-01,
1777 -1.697592457770869e+00, -1.802933168781950e+00,
1778 3.093354679843505e+00, 2.077595676404383e+00
1780 static const double d[] =
1782 7.784695709041462e-03, 3.224671290700398e-01,
1783 2.445134137142996e+00, 3.754408661907416e+00
1786 static const double spi2 = 8.862269254527579e-01;
1787 static const double pbreak = 0.95150;
1788 double ax = fabs (
x), y;
1794 const double q = 0.5 *
x,
r = q*q;
1795 const double yn = (((((a[0]*
r + a[1])*
r + a[2])*
r + a[3])*
r + a[4])*
r + a[5])*q;
1796 const double yd = ((((b[0]*
r + b[1])*
r + b[2])*
r + b[3])*
r + b[4])*
r + 1.0;
1802 const double q = std::sqrt (-2*std::log (0.5*(1-ax)));
1803 const double yn = ((((c[0]*q + c[1])*q + c[2])*q + c[3])*q + c[4])*q + c[5];
1804 const double yd = (((
d[0]*q +
d[1])*q +
d[2])*q +
d[3])*q + 1.0;
1815 double u = (
erf (y) -
x) * spi2 * exp (y*y);
1825 return do_erfinv (
x,
true);
1831 return do_erfinv (
x,
false);
1839 if (std::abs (
x) < 1)
1841 double im =
x.imag ();
1842 double u =
expm1 (
x.real ());
1843 double v = sin (im/2);
1845 retval =
Complex (u*v + u + v, (u+1) * sin (im));
1848 retval = std::exp (
x) -
Complex (1);
1858 if (std::abs (
x) < 1)
1860 float im =
x.imag ();
1861 float u =
expm1 (
x.real ());
1862 float v = sin (im/2);
1890 result = std::tgamma (
x);
1913 result = std::tgammaf (
x);
1923 double r =
x.real (), i =
x.imag ();
1925 if (fabs (
r) < 0.5 && fabs (i) < 0.5)
1927 double u = 2*
r +
r*
r + i*i;
1932 retval = std::log (
Complex (1) +
x);
1942 float r =
x.real (), i =
x.imag ();
1944 if (fabs (
r) < 0.5 && fabs (i) < 0.5)
1946 float u = 2*
r +
r*
r + i*i;
1956 static const double pi = 3.14159265358979323846;
1958 template <
typename T>
1969 return std::log (
x);
1976 return std::log (
x);
1979 template <
typename T>
1981 lanczos_approximation_psi (
const T zc)
1987 static const T dg_coeff[10] =
1989 -0.83333333333333333e-1, 0.83333333333333333e-2,
1990 -0.39682539682539683e-2, 0.41666666666666667e-2,
1991 -0.75757575757575758e-2, 0.21092796092796093e-1,
1992 -0.83333333333333333e-1, 0.4432598039215686,
1993 -0.3053954330270122e+1, 0.125318899521531e+2
1996 T overz2 = T (1.0) / (zc * zc);
2001 p += dg_coeff[k] * overz2k;
2002 p +=
xlog (zc) - T (0.5) / zc;
2006 template <
typename T>
2010 static const double euler_mascheroni
2011 = 0.577215664901532860606512090082402431042;
2023 p =
psi (1 - z) - (pi / tan (pi * z));
2028 p = - euler_mascheroni;
2036 p += 1.0 / (2 * k - 1);
2038 p = - euler_mascheroni - 2 * std::log (2) + 2 * (p);
2048 const signed char n = 10 - z;
2049 for (
signed char k =
n - 1; k >= 0; k--)
2053 p += lanczos_approximation_psi (zc);
2065 template <
typename T>
2071 typedef typename std::complex<T>::value_type P;
2076 std::complex<T> dgam (0.0, 0.0);
2078 dgam = std::complex<T> (
psi (z_r), 0.0);
2080 dgam =
psi (P (1.0) - z)- (P (pi) / tan (P (pi) * z));
2084 std::complex<T> z_m = z;
2087 unsigned char n = 8 - z_ra;
2088 z_m = z + std::complex<T> (
n, 0.0);
2093 std::complex<T> z_p = z + P (
n - 1);
2094 for (
unsigned char k =
n; k > 0; k--, z_p -= 1.0)
2095 dgam -= P (1.0) / z_p;
2105 dgam += lanczos_approximation_psi (z_m);
2116 template <
typename T>
2144 template <
typename T>
2150 fortran_psifn<T> (z,
n, ans,
ierr);
2181 #if defined (HAVE_LGAMMA_R)
2183 result = lgamma_r (
x, &sgngam);
2186 int sgngam = signgam;
2190 return result +
Complex (0., M_PI);
2200 #if defined (HAVE_LGAMMAF_R)
2202 result = lgammaf_r (
x, &sgngam);
2204 result = std::lgammaf (
x);
2205 int sgngam = signgam;
2218 ?
Complex (std::log (-(1.0 +
x)), M_PI)
2230 OCTAVE_END_NAMESPACE(math)
2231 OCTAVE_END_NAMESPACE(
octave)
octave_value_list do_bessel(enum bessel_type type, const char *fcn, const octave_value_list &args, int nargout)
subroutine cairy(Z, ID, KODE, AI, NZ, IERR)
subroutine cbesh(Z, FNU, KODE, M, N, CY, NZ, IERR)
subroutine cbesi(Z, FNU, KODE, N, CY, NZ, IERR)
subroutine cbesj(Z, FNU, KODE, N, CY, NZ, IERR)
subroutine cbesk(Z, FNU, KODE, N, CY, NZ, IERR)
subroutine cbesy(Z, FNU, KODE, N, CY, NZ, CWRK, IERR)
subroutine cbiry(Z, ID, KODE, BI, IERR)
octave_idx_type rows() const
void resize(const dim_vector &dv, const T &rfv)
Size of the specified dimension.
octave_idx_type cols() const
const dim_vector & dims() const
Return a const-reference so that dims ()(i) works efficiently.
octave_idx_type numel() const
Number of elements in the array.
void resize(octave_idx_type nr, octave_idx_type nc, const Complex &rfv=Complex(0))
void resize(octave_idx_type nr, octave_idx_type nc, const FloatComplex &rfv=FloatComplex(0))
Vector representing the dimensions (size) of an Array.
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
subroutine dpsifn(X, N, KODE, M, ANS, NZ, IERR)
#define F77_CONST_CMPLX_ARG(x)
#define F77_XFCN(f, F, args)
octave_f77_int_type F77_INT
double lo_ieee_nan_value()
Complex asin(const Complex &x)
bool negative_sign(double x)
std::complex< T > floor(const std::complex< T > &x)
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE const F77_INT F77_INT & ierr
F77_RET_T const F77_DBLE * x
F77_RET_T const F77_DBLE const F77_DBLE * f
Complex(* dptr)(const Complex &, double, int, octave_idx_type &)
void fortran_psifn< float >(float z, octave_idx_type n_arg, float &ans, octave_idx_type &ierr)
Complex besselj(double alpha, const Complex &x, bool scaled, octave_idx_type &ierr)
Complex besselh2(double alpha, const Complex &x, bool scaled, octave_idx_type &ierr)
Complex erf(const Complex &x)
void fortran_psifn< double >(double z, octave_idx_type n_arg, double &ans, octave_idx_type &ierr)
Complex rc_log1p(double x)
Complex bessely(double alpha, const Complex &x, bool scaled, octave_idx_type &ierr)
Complex besselk(double alpha, const Complex &x, bool scaled, octave_idx_type &ierr)
Complex besselh1(double alpha, const Complex &x, bool scaled, octave_idx_type &ierr)
Complex rc_lgamma(double x)
#define ALL_BESSEL(name, fcn)
double xlog(const double &x)
FloatComplex(* fptr)(const FloatComplex &, float, int, octave_idx_type &)
Complex airy(const Complex &z, bool deriv, bool scaled, octave_idx_type &ierr)
Complex expm1(const Complex &x)
void ellipj(double u, double m, double &sn, double &cn, double &dn, double &err)
Complex besseli(double alpha, const Complex &x, bool scaled, octave_idx_type &ierr)
Complex biry(const Complex &z, bool deriv, bool scaled, octave_idx_type &ierr)
Complex log1p(const Complex &x)
Complex erfc(const Complex &x)
std::complex< double > w(std::complex< double > z, double relerr=0)
std::complex< double > erfc(std::complex< double > z, double relerr=0)
std::complex< double > erfcx(std::complex< double > z, double relerr=0)
std::complex< double > erfi(std::complex< double > z, double relerr=0)
std::complex< double > erf(std::complex< double > z, double relerr=0)
std::complex< double > Dawson(std::complex< double > z, double relerr=0)
std::complex< double > Complex
std::complex< float > FloatComplex
octave_int< T > pow(const octave_int< T > &a, const octave_int< T > &b)
subroutine psifn(X, N, KODE, M, ANS, NZ, IERR)
F77_RET_T F77_FUNC(xerbla, XERBLA)(F77_CONST_CHAR_ARG_DEF(s_arg
subroutine zairy(ZR, ZI, ID, KODE, AIR, AII, NZ, IERR)
subroutine zbesh(ZR, ZI, FNU, KODE, M, N, CYR, CYI, NZ, IERR)
subroutine zbesi(ZR, ZI, FNU, KODE, N, CYR, CYI, NZ, IERR)
subroutine zbesj(ZR, ZI, FNU, KODE, N, CYR, CYI, NZ, IERR)
subroutine zbesk(ZR, ZI, FNU, KODE, N, CYR, CYI, NZ, IERR)
subroutine zbesy(ZR, ZI, FNU, KODE, N, CYR, CYI, NZ, CWRKR, CWRKI, IERR)
subroutine zbiry(ZR, ZI, ID, KODE, BIR, BII, IERR)