Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #369 from pv/fix-cephes-vals

MAINT: special: Cephes cleanup
  • Loading branch information...
commit d47bc968d198f99e85ea45d13bceaf1a3c66235b 2 parents dc7e0c7 + e66e90b
@rgommers rgommers authored
Showing with 10,223 additions and 10,328 deletions.
  1. +656 −630 scipy/special/cephes/airy.c
  2. +72 −81 scipy/special/cephes/bdtr.c
  3. +76 −89 scipy/special/cephes/beta.c
  4. +8 −8 scipy/special/cephes/btdtr.c
  5. +53 −57 scipy/special/cephes/cbrt.c
  6. +18 −19 scipy/special/cephes/chbevl.c
  7. +26 −27 scipy/special/cephes/chdtr.c
  8. +97 −82 scipy/special/cephes/const.c
  9. +40 −46 scipy/special/cephes/cpmul.c
  10. +257 −248 scipy/special/cephes/dawsn.c
  11. +59 −65 scipy/special/cephes/ellie.c
  12. +59 −66 scipy/special/cephes/ellik.c
  13. +107 −104 scipy/special/cephes/ellpe.c
  14. +59 −65 scipy/special/cephes/ellpj.c
  15. +134 −139 scipy/special/cephes/ellpk.c
  16. +125 −138 scipy/special/cephes/euclid.c
  17. +111 −96 scipy/special/cephes/exp10.c
  18. +69 −65 scipy/special/cephes/exp2.c
  19. +98 −110 scipy/special/cephes/expn.c
  20. +45 −50 scipy/special/cephes/fdtr.c
  21. +337 −324 scipy/special/cephes/fresnl.c
  22. +350 −336 scipy/special/cephes/gamma.c
  23. +25 −28 scipy/special/cephes/gdtr.c
  24. +177 −192 scipy/special/cephes/gels.c
  25. +287 −271 scipy/special/cephes/hyp2f1.c
  26. +190 −200 scipy/special/cephes/hyperg.c
  27. +243 −247 scipy/special/cephes/i0.c
  28. +252 −258 scipy/special/cephes/i1.c
  29. +81 −89 scipy/special/cephes/igam.c
  30. +110 −121 scipy/special/cephes/igami.c
  31. +207 −225 scipy/special/cephes/incbet.c
  32. +181 −207 scipy/special/cephes/incbi.c
  33. +313 −291 scipy/special/cephes/j0.c
  34. +302 −284 scipy/special/cephes/j1.c
  35. +93 −72 scipy/special/cephes/jv.c
  36. +173 −175 scipy/special/cephes/k0.c
  37. +174 −177 scipy/special/cephes/k1.c
  38. +148 −159 scipy/special/cephes/kn.c
  39. +187 −205 scipy/special/cephes/kolmogorov.c
  40. +14 −14 scipy/special/cephes/mconf.h
  41. +19 −24 scipy/special/cephes/mmmpy.c
  42. +6 −6 scipy/special/cephes/mtherr.c
  43. +26 −30 scipy/special/cephes/mtransp.c
  44. +13 −17 scipy/special/cephes/mvmpy.c
  45. +41 −44 scipy/special/cephes/nbdtr.c
  46. +279 −258 scipy/special/cephes/ndtr.c
  47. +255 −245 scipy/special/cephes/ndtri.c
  48. +30 −33 scipy/special/cephes/pdtr.c
  49. +30 −30 scipy/special/cephes/polevl.c
  50. +195 −202 scipy/special/cephes/polmisc.c
  51. +137 −147 scipy/special/cephes/polrt.c
  52. +207 −225 scipy/special/cephes/polyn.c
  53. +81 −93 scipy/special/cephes/powi.c
  54. +180 −172 scipy/special/cephes/protos.h
  55. +80 −95 scipy/special/cephes/psi.c
  56. +110 −117 scipy/special/cephes/rgamma.c
  57. +22 −24 scipy/special/cephes/round.c
  58. +85 −79 scipy/special/cephes/scipy_iv.c
  59. +12 −6 scipy/special/cephes/setprec.c
  60. +424 −431 scipy/special/cephes/shichi.c
  61. +462 −442 scipy/special/cephes/sici.c
  62. +53 −54 scipy/special/cephes/simpsn.c
  63. +89 −103 scipy/special/cephes/simq.c
  64. +172 −179 scipy/special/cephes/sincos.c
  65. +143 −148 scipy/special/cephes/sindg.c
  66. +103 −104 scipy/special/cephes/spence.c
  67. +84 −94 scipy/special/cephes/stdtr.c
  68. +168 −175 scipy/special/cephes/struve.c
  69. +52 −48 scipy/special/cephes/tandg.c
  70. +45 −43 scipy/special/cephes/tukey.c
  71. +65 −61 scipy/special/cephes/unity.c
  72. +37 −38 scipy/special/cephes/yn.c
  73. +95 −99 scipy/special/cephes/zeta.c
  74. +404 −402 scipy/special/cephes/zetac.c
  75. +6 −0 scipy/special/tests/test_basic.py
View
1,286 scipy/special/cephes/airy.c
@@ -1,6 +1,6 @@
-/* airy.c
+/* airy.c
*
- * Airy function
+ * Airy function
*
*
*
@@ -17,7 +17,7 @@
*
* Solution of the differential equation
*
- * y"(x) = xy.
+ * y"(x) = xy.
*
* The function returns the two independent solutions Ai, Bi
* and their first derivatives Ai'(x), Bi'(x).
@@ -51,9 +51,9 @@
/* airy.c */
/*
-Cephes Math Library Release 2.8: June, 2000
-Copyright 1984, 1987, 1989, 2000 by Stephen L. Moshier
-*/
+ * Cephes Math Library Release 2.8: June, 2000
+ * Copyright 1984, 1987, 1989, 2000 by Stephen L. Moshier
+ */
#include "mconf.h"
@@ -61,9 +61,9 @@ static double c1 = 0.35502805388781723926;
static double c2 = 0.258819403792806798405;
static double sqrt3 = 1.732050807568877293527;
static double sqpii = 5.64189583547756286948E-1;
-extern double PI;
-extern double MAXNUM, MACHEP;
+extern double MACHEP;
+
#ifdef UNK
#define MAXAIRY 25.77
#endif
@@ -80,873 +80,899 @@ extern double MAXNUM, MACHEP;
#ifdef UNK
static double AN[8] = {
- 3.46538101525629032477E-1,
- 1.20075952739645805542E1,
- 7.62796053615234516538E1,
- 1.68089224934630576269E2,
- 1.59756391350164413639E2,
- 7.05360906840444183113E1,
- 1.40264691163389668864E1,
- 9.99999999999999995305E-1,
+ 3.46538101525629032477E-1,
+ 1.20075952739645805542E1,
+ 7.62796053615234516538E1,
+ 1.68089224934630576269E2,
+ 1.59756391350164413639E2,
+ 7.05360906840444183113E1,
+ 1.40264691163389668864E1,
+ 9.99999999999999995305E-1,
};
+
static double AD[8] = {
- 5.67594532638770212846E-1,
- 1.47562562584847203173E1,
- 8.45138970141474626562E1,
- 1.77318088145400459522E2,
- 1.64234692871529701831E2,
- 7.14778400825575695274E1,
- 1.40959135607834029598E1,
- 1.00000000000000000470E0,
+ 5.67594532638770212846E-1,
+ 1.47562562584847203173E1,
+ 8.45138970141474626562E1,
+ 1.77318088145400459522E2,
+ 1.64234692871529701831E2,
+ 7.14778400825575695274E1,
+ 1.40959135607834029598E1,
+ 1.00000000000000000470E0,
};
#endif
#ifdef DEC
static unsigned short AN[32] = {
-0037661,0066561,0024675,0131301,
-0041100,0017434,0034324,0101466,
-0041630,0107450,0067427,0007430,
-0042050,0013327,0071000,0034737,
-0042037,0140642,0156417,0167366,
-0041615,0011172,0075147,0051165,
-0041140,0066152,0160520,0075146,
-0040200,0000000,0000000,0000000,
+ 0037661, 0066561, 0024675, 0131301,
+ 0041100, 0017434, 0034324, 0101466,
+ 0041630, 0107450, 0067427, 0007430,
+ 0042050, 0013327, 0071000, 0034737,
+ 0042037, 0140642, 0156417, 0167366,
+ 0041615, 0011172, 0075147, 0051165,
+ 0041140, 0066152, 0160520, 0075146,
+ 0040200, 0000000, 0000000, 0000000,
};
+
static unsigned short AD[32] = {
-0040021,0046740,0011422,0064606,
-0041154,0014640,0024631,0062450,
-0041651,0003435,0101152,0106401,
-0042061,0050556,0034605,0136602,
-0042044,0036024,0152377,0151414,
-0041616,0172247,0072216,0115374,
-0041141,0104334,0124154,0166007,
-0040200,0000000,0000000,0000000,
+ 0040021, 0046740, 0011422, 0064606,
+ 0041154, 0014640, 0024631, 0062450,
+ 0041651, 0003435, 0101152, 0106401,
+ 0042061, 0050556, 0034605, 0136602,
+ 0042044, 0036024, 0152377, 0151414,
+ 0041616, 0172247, 0072216, 0115374,
+ 0041141, 0104334, 0124154, 0166007,
+ 0040200, 0000000, 0000000, 0000000,
};
#endif
#ifdef IBMPC
static unsigned short AN[32] = {
-0xb658,0x2537,0x2dae,0x3fd6,
-0x9067,0x871a,0x03e3,0x4028,
-0xe1e3,0x0de2,0x11e5,0x4053,
-0x073c,0xee40,0x02da,0x4065,
-0xfddf,0x5ba1,0xf834,0x4063,
-0xea4f,0x4f4c,0xa24f,0x4051,
-0x0f4d,0x5c2a,0x0d8d,0x402c,
-0x0000,0x0000,0x0000,0x3ff0,
+ 0xb658, 0x2537, 0x2dae, 0x3fd6,
+ 0x9067, 0x871a, 0x03e3, 0x4028,
+ 0xe1e3, 0x0de2, 0x11e5, 0x4053,
+ 0x073c, 0xee40, 0x02da, 0x4065,
+ 0xfddf, 0x5ba1, 0xf834, 0x4063,
+ 0xea4f, 0x4f4c, 0xa24f, 0x4051,
+ 0x0f4d, 0x5c2a, 0x0d8d, 0x402c,
+ 0x0000, 0x0000, 0x0000, 0x3ff0,
};
+
static unsigned short AD[32] = {
-0x4d31,0x0262,0x29bc,0x3fe2,
-0x2ca5,0x0533,0x8334,0x402d,
-0x51a0,0xb04d,0x20e3,0x4055,
-0xb7b0,0xc730,0x2a2d,0x4066,
-0xfa61,0x9a9f,0x8782,0x4064,
-0xd35f,0xee91,0xde94,0x4051,
-0x9d81,0x950d,0x311b,0x402c,
-0x0000,0x0000,0x0000,0x3ff0,
+ 0x4d31, 0x0262, 0x29bc, 0x3fe2,
+ 0x2ca5, 0x0533, 0x8334, 0x402d,
+ 0x51a0, 0xb04d, 0x20e3, 0x4055,
+ 0xb7b0, 0xc730, 0x2a2d, 0x4066,
+ 0xfa61, 0x9a9f, 0x8782, 0x4064,
+ 0xd35f, 0xee91, 0xde94, 0x4051,
+ 0x9d81, 0x950d, 0x311b, 0x402c,
+ 0x0000, 0x0000, 0x0000, 0x3ff0,
};
#endif
#ifdef MIEEE
static unsigned short AN[32] = {
-0x3fd6,0x2dae,0x2537,0xb658,
-0x4028,0x03e3,0x871a,0x9067,
-0x4053,0x11e5,0x0de2,0xe1e3,
-0x4065,0x02da,0xee40,0x073c,
-0x4063,0xf834,0x5ba1,0xfddf,
-0x4051,0xa24f,0x4f4c,0xea4f,
-0x402c,0x0d8d,0x5c2a,0x0f4d,
-0x3ff0,0x0000,0x0000,0x0000,
+ 0x3fd6, 0x2dae, 0x2537, 0xb658,
+ 0x4028, 0x03e3, 0x871a, 0x9067,
+ 0x4053, 0x11e5, 0x0de2, 0xe1e3,
+ 0x4065, 0x02da, 0xee40, 0x073c,
+ 0x4063, 0xf834, 0x5ba1, 0xfddf,
+ 0x4051, 0xa24f, 0x4f4c, 0xea4f,
+ 0x402c, 0x0d8d, 0x5c2a, 0x0f4d,
+ 0x3ff0, 0x0000, 0x0000, 0x0000,
};
+
static unsigned short AD[32] = {
-0x3fe2,0x29bc,0x0262,0x4d31,
-0x402d,0x8334,0x0533,0x2ca5,
-0x4055,0x20e3,0xb04d,0x51a0,
-0x4066,0x2a2d,0xc730,0xb7b0,
-0x4064,0x8782,0x9a9f,0xfa61,
-0x4051,0xde94,0xee91,0xd35f,
-0x402c,0x311b,0x950d,0x9d81,
-0x3ff0,0x0000,0x0000,0x0000,
+ 0x3fe2, 0x29bc, 0x0262, 0x4d31,
+ 0x402d, 0x8334, 0x0533, 0x2ca5,
+ 0x4055, 0x20e3, 0xb04d, 0x51a0,
+ 0x4066, 0x2a2d, 0xc730, 0xb7b0,
+ 0x4064, 0x8782, 0x9a9f, 0xfa61,
+ 0x4051, 0xde94, 0xee91, 0xd35f,
+ 0x402c, 0x311b, 0x950d, 0x9d81,
+ 0x3ff0, 0x0000, 0x0000, 0x0000,
};
#endif
#ifdef UNK
static double APN[8] = {
- 6.13759184814035759225E-1,
- 1.47454670787755323881E1,
- 8.20584123476060982430E1,
- 1.71184781360976385540E2,
- 1.59317847137141783523E2,
- 6.99778599330103016170E1,
- 1.39470856980481566958E1,
- 1.00000000000000000550E0,
+ 6.13759184814035759225E-1,
+ 1.47454670787755323881E1,
+ 8.20584123476060982430E1,
+ 1.71184781360976385540E2,
+ 1.59317847137141783523E2,
+ 6.99778599330103016170E1,
+ 1.39470856980481566958E1,
+ 1.00000000000000000550E0,
};
+
static double APD[8] = {
- 3.34203677749736953049E-1,
- 1.11810297306158156705E1,
- 7.11727352147859965283E1,
- 1.58778084372838313640E2,
- 1.53206427475809220834E2,
- 6.86752304592780337944E1,
- 1.38498634758259442477E1,
- 9.99999999999999994502E-1,
+ 3.34203677749736953049E-1,
+ 1.11810297306158156705E1,
+ 7.11727352147859965283E1,
+ 1.58778084372838313640E2,
+ 1.53206427475809220834E2,
+ 6.86752304592780337944E1,
+ 1.38498634758259442477E1,
+ 9.99999999999999994502E-1,
};
#endif
#ifdef DEC
static unsigned short APN[32] = {
-0040035,0017522,0065145,0054755,
-0041153,0166556,0161471,0057174,
-0041644,0016750,0034445,0046462,
-0042053,0027515,0152316,0046717,
-0042037,0050536,0067023,0023264,
-0041613,0172252,0007240,0131055,
-0041137,0023503,0052472,0002305,
-0040200,0000000,0000000,0000000,
+ 0040035, 0017522, 0065145, 0054755,
+ 0041153, 0166556, 0161471, 0057174,
+ 0041644, 0016750, 0034445, 0046462,
+ 0042053, 0027515, 0152316, 0046717,
+ 0042037, 0050536, 0067023, 0023264,
+ 0041613, 0172252, 0007240, 0131055,
+ 0041137, 0023503, 0052472, 0002305,
+ 0040200, 0000000, 0000000, 0000000,
};
+
static unsigned short APD[32] = {
-0037653,0016276,0112106,0126625,
-0041062,0162577,0067111,0111761,
-0041616,0054160,0140004,0137455,
-0042036,0143460,0104626,0157206,
-0042031,0032330,0067131,0114260,
-0041611,0054667,0147207,0134564,
-0041135,0114412,0070653,0146015,
-0040200,0000000,0000000,0000000,
+ 0037653, 0016276, 0112106, 0126625,
+ 0041062, 0162577, 0067111, 0111761,
+ 0041616, 0054160, 0140004, 0137455,
+ 0042036, 0143460, 0104626, 0157206,
+ 0042031, 0032330, 0067131, 0114260,
+ 0041611, 0054667, 0147207, 0134564,
+ 0041135, 0114412, 0070653, 0146015,
+ 0040200, 0000000, 0000000, 0000000,
};
#endif
#ifdef IBMPC
static unsigned short APN[32] = {
-0xab3e,0x4d4c,0xa3ea,0x3fe3,
-0x2bcf,0xdc67,0x7dad,0x402d,
-0xa9a6,0x0724,0x83bd,0x4054,
-0xc9ba,0xba99,0x65e9,0x4065,
-0x64d7,0xcdc2,0xea2b,0x4063,
-0x1646,0x41d4,0x7e95,0x4051,
-0x4099,0x6aa7,0xe4e8,0x402b,
-0x0000,0x0000,0x0000,0x3ff0,
+ 0xab3e, 0x4d4c, 0xa3ea, 0x3fe3,
+ 0x2bcf, 0xdc67, 0x7dad, 0x402d,
+ 0xa9a6, 0x0724, 0x83bd, 0x4054,
+ 0xc9ba, 0xba99, 0x65e9, 0x4065,
+ 0x64d7, 0xcdc2, 0xea2b, 0x4063,
+ 0x1646, 0x41d4, 0x7e95, 0x4051,
+ 0x4099, 0x6aa7, 0xe4e8, 0x402b,
+ 0x0000, 0x0000, 0x0000, 0x3ff0,
};
+
static unsigned short APD[32] = {
-0xd5b3,0xd288,0x6397,0x3fd5,
-0x327e,0xedc9,0x5caf,0x4026,
-0x97e6,0x1800,0xcb0e,0x4051,
-0xdbd1,0x1132,0xd8e6,0x4063,
-0x3316,0x0dcb,0x269b,0x4063,
-0xf72f,0xf9d0,0x2b36,0x4051,
-0x7982,0x4e35,0xb321,0x402b,
-0x0000,0x0000,0x0000,0x3ff0,
+ 0xd5b3, 0xd288, 0x6397, 0x3fd5,
+ 0x327e, 0xedc9, 0x5caf, 0x4026,
+ 0x97e6, 0x1800, 0xcb0e, 0x4051,
+ 0xdbd1, 0x1132, 0xd8e6, 0x4063,
+ 0x3316, 0x0dcb, 0x269b, 0x4063,
+ 0xf72f, 0xf9d0, 0x2b36, 0x4051,
+ 0x7982, 0x4e35, 0xb321, 0x402b,
+ 0x0000, 0x0000, 0x0000, 0x3ff0,
};
#endif
#ifdef MIEEE
static unsigned short APN[32] = {
-0x3fe3,0xa3ea,0x4d4c,0xab3e,
-0x402d,0x7dad,0xdc67,0x2bcf,
-0x4054,0x83bd,0x0724,0xa9a6,
-0x4065,0x65e9,0xba99,0xc9ba,
-0x4063,0xea2b,0xcdc2,0x64d7,
-0x4051,0x7e95,0x41d4,0x1646,
-0x402b,0xe4e8,0x6aa7,0x4099,
-0x3ff0,0x0000,0x0000,0x0000,
+ 0x3fe3, 0xa3ea, 0x4d4c, 0xab3e,
+ 0x402d, 0x7dad, 0xdc67, 0x2bcf,
+ 0x4054, 0x83bd, 0x0724, 0xa9a6,
+ 0x4065, 0x65e9, 0xba99, 0xc9ba,
+ 0x4063, 0xea2b, 0xcdc2, 0x64d7,
+ 0x4051, 0x7e95, 0x41d4, 0x1646,
+ 0x402b, 0xe4e8, 0x6aa7, 0x4099,
+ 0x3ff0, 0x0000, 0x0000, 0x0000,
};
+
static unsigned short APD[32] = {
-0x3fd5,0x6397,0xd288,0xd5b3,
-0x4026,0x5caf,0xedc9,0x327e,
-0x4051,0xcb0e,0x1800,0x97e6,
-0x4063,0xd8e6,0x1132,0xdbd1,
-0x4063,0x269b,0x0dcb,0x3316,
-0x4051,0x2b36,0xf9d0,0xf72f,
-0x402b,0xb321,0x4e35,0x7982,
-0x3ff0,0x0000,0x0000,0x0000,
+ 0x3fd5, 0x6397, 0xd288, 0xd5b3,
+ 0x4026, 0x5caf, 0xedc9, 0x327e,
+ 0x4051, 0xcb0e, 0x1800, 0x97e6,
+ 0x4063, 0xd8e6, 0x1132, 0xdbd1,
+ 0x4063, 0x269b, 0x0dcb, 0x3316,
+ 0x4051, 0x2b36, 0xf9d0, 0xf72f,
+ 0x402b, 0xb321, 0x4e35, 0x7982,
+ 0x3ff0, 0x0000, 0x0000, 0x0000,
};
#endif
#ifdef UNK
static double BN16[5] = {
--2.53240795869364152689E-1,
- 5.75285167332467384228E-1,
--3.29907036873225371650E-1,
- 6.44404068948199951727E-2,
--3.82519546641336734394E-3,
+ -2.53240795869364152689E-1,
+ 5.75285167332467384228E-1,
+ -3.29907036873225371650E-1,
+ 6.44404068948199951727E-2,
+ -3.82519546641336734394E-3,
};
+
static double BD16[5] = {
-/* 1.00000000000000000000E0,*/
--7.15685095054035237902E0,
- 1.06039580715664694291E1,
--5.23246636471251500874E0,
- 9.57395864378383833152E-1,
--5.50828147163549611107E-2,
+ /* 1.00000000000000000000E0, */
+ -7.15685095054035237902E0,
+ 1.06039580715664694291E1,
+ -5.23246636471251500874E0,
+ 9.57395864378383833152E-1,
+ -5.50828147163549611107E-2,
};
#endif
#ifdef DEC
static unsigned short BN16[20] = {
-0137601,0124307,0010213,0035210,
-0040023,0042743,0101621,0016031,
-0137650,0164623,0036056,0074511,
-0037203,0174525,0000473,0142474,
-0136172,0130041,0066726,0064324,
+ 0137601, 0124307, 0010213, 0035210,
+ 0040023, 0042743, 0101621, 0016031,
+ 0137650, 0164623, 0036056, 0074511,
+ 0037203, 0174525, 0000473, 0142474,
+ 0136172, 0130041, 0066726, 0064324,
};
+
static unsigned short BD16[20] = {
-/*0040200,0000000,0000000,0000000,*/
-0140745,0002354,0044335,0055276,
-0041051,0124717,0170130,0104013,
-0140647,0070135,0046473,0103501,
-0040165,0013745,0033324,0127766,
-0137141,0117204,0076164,0033107,
+ /*0040200,0000000,0000000,0000000, */
+ 0140745, 0002354, 0044335, 0055276,
+ 0041051, 0124717, 0170130, 0104013,
+ 0140647, 0070135, 0046473, 0103501,
+ 0040165, 0013745, 0033324, 0127766,
+ 0137141, 0117204, 0076164, 0033107,
};
#endif
#ifdef IBMPC
static unsigned short BN16[20] = {
-0x6751,0xe211,0x3518,0xbfd0,
-0x2383,0x7072,0x68bc,0x3fe2,
-0xcf29,0x6785,0x1d32,0xbfd5,
-0x78a8,0xa027,0x7f2a,0x3fb0,
-0xcd1b,0x2dba,0x5604,0xbf6f,
+ 0x6751, 0xe211, 0x3518, 0xbfd0,
+ 0x2383, 0x7072, 0x68bc, 0x3fe2,
+ 0xcf29, 0x6785, 0x1d32, 0xbfd5,
+ 0x78a8, 0xa027, 0x7f2a, 0x3fb0,
+ 0xcd1b, 0x2dba, 0x5604, 0xbf6f,
};
+
static unsigned short BD16[20] = {
-/*0x0000,0x0000,0x0000,0x3ff0,*/
-0xab58,0x891b,0xa09d,0xc01c,
-0x1101,0xfe0b,0x3539,0x4025,
-0x70e8,0xa9a7,0xee0b,0xc014,
-0x95ff,0xa6da,0xa2fc,0x3fee,
-0x86c9,0x8f8e,0x33d0,0xbfac,
+ /*0x0000,0x0000,0x0000,0x3ff0, */
+ 0xab58, 0x891b, 0xa09d, 0xc01c,
+ 0x1101, 0xfe0b, 0x3539, 0x4025,
+ 0x70e8, 0xa9a7, 0xee0b, 0xc014,
+ 0x95ff, 0xa6da, 0xa2fc, 0x3fee,
+ 0x86c9, 0x8f8e, 0x33d0, 0xbfac,
};
#endif
#ifdef MIEEE
static unsigned short BN16[20] = {
-0xbfd0,0x3518,0xe211,0x6751,
-0x3fe2,0x68bc,0x7072,0x2383,
-0xbfd5,0x1d32,0x6785,0xcf29,
-0x3fb0,0x7f2a,0xa027,0x78a8,
-0xbf6f,0x5604,0x2dba,0xcd1b,
+ 0xbfd0, 0x3518, 0xe211, 0x6751,
+ 0x3fe2, 0x68bc, 0x7072, 0x2383,
+ 0xbfd5, 0x1d32, 0x6785, 0xcf29,
+ 0x3fb0, 0x7f2a, 0xa027, 0x78a8,
+ 0xbf6f, 0x5604, 0x2dba, 0xcd1b,
};
+
static unsigned short BD16[20] = {
-/*0x3ff0,0x0000,0x0000,0x0000,*/
-0xc01c,0xa09d,0x891b,0xab58,
-0x4025,0x3539,0xfe0b,0x1101,
-0xc014,0xee0b,0xa9a7,0x70e8,
-0x3fee,0xa2fc,0xa6da,0x95ff,
-0xbfac,0x33d0,0x8f8e,0x86c9,
+ /*0x3ff0,0x0000,0x0000,0x0000, */
+ 0xc01c, 0xa09d, 0x891b, 0xab58,
+ 0x4025, 0x3539, 0xfe0b, 0x1101,
+ 0xc014, 0xee0b, 0xa9a7, 0x70e8,
+ 0x3fee, 0xa2fc, 0xa6da, 0x95ff,
+ 0xbfac, 0x33d0, 0x8f8e, 0x86c9,
};
#endif
#ifdef UNK
static double BPPN[5] = {
- 4.65461162774651610328E-1,
--1.08992173800493920734E0,
- 6.38800117371827987759E-1,
--1.26844349553102907034E-1,
- 7.62487844342109852105E-3,
+ 4.65461162774651610328E-1,
+ -1.08992173800493920734E0,
+ 6.38800117371827987759E-1,
+ -1.26844349553102907034E-1,
+ 7.62487844342109852105E-3,
};
+
static double BPPD[5] = {
-/* 1.00000000000000000000E0,*/
--8.70622787633159124240E0,
- 1.38993162704553213172E1,
--7.14116144616431159572E0,
- 1.34008595960680518666E0,
--7.84273211323341930448E-2,
+ /* 1.00000000000000000000E0, */
+ -8.70622787633159124240E0,
+ 1.38993162704553213172E1,
+ -7.14116144616431159572E0,
+ 1.34008595960680518666E0,
+ -7.84273211323341930448E-2,
};
#endif
#ifdef DEC
static unsigned short BPPN[20] = {
-0037756,0050354,0167531,0135731,
-0140213,0101216,0032767,0020375,
-0040043,0104147,0106312,0177632,
-0137401,0161574,0032015,0043714,
-0036371,0155035,0143165,0142262,
+ 0037756, 0050354, 0167531, 0135731,
+ 0140213, 0101216, 0032767, 0020375,
+ 0040043, 0104147, 0106312, 0177632,
+ 0137401, 0161574, 0032015, 0043714,
+ 0036371, 0155035, 0143165, 0142262,
};
+
static unsigned short BPPD[20] = {
-/*0040200,0000000,0000000,0000000,*/
-0141013,0046265,0115005,0161053,
-0041136,0061631,0072445,0156131,
-0140744,0102145,0001127,0065304,
-0040253,0103757,0146453,0102513,
-0137240,0117200,0155402,0113500,
+ /*0040200,0000000,0000000,0000000, */
+ 0141013, 0046265, 0115005, 0161053,
+ 0041136, 0061631, 0072445, 0156131,
+ 0140744, 0102145, 0001127, 0065304,
+ 0040253, 0103757, 0146453, 0102513,
+ 0137240, 0117200, 0155402, 0113500,
};
#endif
#ifdef IBMPC
static unsigned short BPPN[20] = {
-0x377b,0x9deb,0xca1d,0x3fdd,
-0xe420,0xc6be,0x7051,0xbff1,
-0x5ff3,0xf199,0x710c,0x3fe4,
-0xa8fa,0x8681,0x3c6f,0xbfc0,
-0xb896,0xb8ce,0x3b43,0x3f7f,
+ 0x377b, 0x9deb, 0xca1d, 0x3fdd,
+ 0xe420, 0xc6be, 0x7051, 0xbff1,
+ 0x5ff3, 0xf199, 0x710c, 0x3fe4,
+ 0xa8fa, 0x8681, 0x3c6f, 0xbfc0,
+ 0xb896, 0xb8ce, 0x3b43, 0x3f7f,
};
+
static unsigned short BPPD[20] = {
-/*0x0000,0x0000,0x0000,0x3ff0,*/
-0xbc45,0xb340,0x6996,0xc021,
-0xbb8b,0x2ea4,0xcc73,0x402b,
-0xed59,0xa04a,0x908c,0xc01c,
-0x70a9,0xf9a5,0x70fd,0x3ff5,
-0x52e8,0x1b60,0x13d0,0xbfb4,
+ /*0x0000,0x0000,0x0000,0x3ff0, */
+ 0xbc45, 0xb340, 0x6996, 0xc021,
+ 0xbb8b, 0x2ea4, 0xcc73, 0x402b,
+ 0xed59, 0xa04a, 0x908c, 0xc01c,
+ 0x70a9, 0xf9a5, 0x70fd, 0x3ff5,
+ 0x52e8, 0x1b60, 0x13d0, 0xbfb4,
};
#endif
#ifdef MIEEE
static unsigned short BPPN[20] = {
-0x3fdd,0xca1d,0x9deb,0x377b,
-0xbff1,0x7051,0xc6be,0xe420,
-0x3fe4,0x710c,0xf199,0x5ff3,
-0xbfc0,0x3c6f,0x8681,0xa8fa,
-0x3f7f,0x3b43,0xb8ce,0xb896,
+ 0x3fdd, 0xca1d, 0x9deb, 0x377b,
+ 0xbff1, 0x7051, 0xc6be, 0xe420,
+ 0x3fe4, 0x710c, 0xf199, 0x5ff3,
+ 0xbfc0, 0x3c6f, 0x8681, 0xa8fa,
+ 0x3f7f, 0x3b43, 0xb8ce, 0xb896,
};
+
static unsigned short BPPD[20] = {
-/*0x3ff0,0x0000,0x0000,0x0000,*/
-0xc021,0x6996,0xb340,0xbc45,
-0x402b,0xcc73,0x2ea4,0xbb8b,
-0xc01c,0x908c,0xa04a,0xed59,
-0x3ff5,0x70fd,0xf9a5,0x70a9,
-0xbfb4,0x13d0,0x1b60,0x52e8,
+ /*0x3ff0,0x0000,0x0000,0x0000, */
+ 0xc021, 0x6996, 0xb340, 0xbc45,
+ 0x402b, 0xcc73, 0x2ea4, 0xbb8b,
+ 0xc01c, 0x908c, 0xa04a, 0xed59,
+ 0x3ff5, 0x70fd, 0xf9a5, 0x70a9,
+ 0xbfb4, 0x13d0, 0x1b60, 0x52e8,
};
#endif
#ifdef UNK
static double AFN[9] = {
--1.31696323418331795333E-1,
--6.26456544431912369773E-1,
--6.93158036036933542233E-1,
--2.79779981545119124951E-1,
--4.91900132609500318020E-2,
--4.06265923594885404393E-3,
--1.59276496239262096340E-4,
--2.77649108155232920844E-6,
--1.67787698489114633780E-8,
+ -1.31696323418331795333E-1,
+ -6.26456544431912369773E-1,
+ -6.93158036036933542233E-1,
+ -2.79779981545119124951E-1,
+ -4.91900132609500318020E-2,
+ -4.06265923594885404393E-3,
+ -1.59276496239262096340E-4,
+ -2.77649108155232920844E-6,
+ -1.67787698489114633780E-8,
};
+
static double AFD[9] = {
-/* 1.00000000000000000000E0,*/
- 1.33560420706553243746E1,
- 3.26825032795224613948E1,
- 2.67367040941499554804E1,
- 9.18707402907259625840E0,
- 1.47529146771666414581E0,
- 1.15687173795188044134E-1,
- 4.40291641615211203805E-3,
- 7.54720348287414296618E-5,
- 4.51850092970580378464E-7,
+ /* 1.00000000000000000000E0, */
+ 1.33560420706553243746E1,
+ 3.26825032795224613948E1,
+ 2.67367040941499554804E1,
+ 9.18707402907259625840E0,
+ 1.47529146771666414581E0,
+ 1.15687173795188044134E-1,
+ 4.40291641615211203805E-3,
+ 7.54720348287414296618E-5,
+ 4.51850092970580378464E-7,
};
#endif
#ifdef DEC
static unsigned short AFN[36] = {
-0137406,0155546,0124127,0033732,
-0140040,0057564,0141263,0041222,
-0140061,0071316,0013674,0175754,
-0137617,0037522,0056637,0120130,
-0137111,0075567,0121755,0166122,
-0136205,0020016,0043317,0002201,
-0135047,0001565,0075130,0002334,
-0133472,0051700,0165021,0131551,
-0131620,0020347,0132165,0013215,
+ 0137406, 0155546, 0124127, 0033732,
+ 0140040, 0057564, 0141263, 0041222,
+ 0140061, 0071316, 0013674, 0175754,
+ 0137617, 0037522, 0056637, 0120130,
+ 0137111, 0075567, 0121755, 0166122,
+ 0136205, 0020016, 0043317, 0002201,
+ 0135047, 0001565, 0075130, 0002334,
+ 0133472, 0051700, 0165021, 0131551,
+ 0131620, 0020347, 0132165, 0013215,
};
+
static unsigned short AFD[36] = {
-/*0040200,0000000,0000000,0000000,*/
-0041125,0131131,0025627,0067623,
-0041402,0135342,0021703,0154315,
-0041325,0162305,0016671,0120175,
-0041022,0177101,0053114,0141632,
-0040274,0153131,0147364,0114306,
-0037354,0166545,0120042,0150530,
-0036220,0043127,0000727,0130273,
-0034636,0043275,0075667,0034733,
-0032762,0112715,0146250,0142474,
+ /*0040200,0000000,0000000,0000000, */
+ 0041125, 0131131, 0025627, 0067623,
+ 0041402, 0135342, 0021703, 0154315,
+ 0041325, 0162305, 0016671, 0120175,
+ 0041022, 0177101, 0053114, 0141632,
+ 0040274, 0153131, 0147364, 0114306,
+ 0037354, 0166545, 0120042, 0150530,
+ 0036220, 0043127, 0000727, 0130273,
+ 0034636, 0043275, 0075667, 0034733,
+ 0032762, 0112715, 0146250, 0142474,
};
#endif
#ifdef IBMPC
static unsigned short AFN[36] = {
-0xe6fb,0xd50a,0xdb6c,0xbfc0,
-0x6852,0x9856,0x0bee,0xbfe4,
-0x9f7d,0xc2f7,0x2e59,0xbfe6,
-0xf40b,0x4bb3,0xe7ea,0xbfd1,
-0xbd8a,0xf47d,0x2f6e,0xbfa9,
-0xe090,0xc8d9,0xa401,0xbf70,
-0x009c,0xaf4b,0xe06e,0xbf24,
-0x366d,0x1d42,0x4a78,0xbec7,
-0xa2d2,0xf68e,0x041c,0xbe52,
+ 0xe6fb, 0xd50a, 0xdb6c, 0xbfc0,
+ 0x6852, 0x9856, 0x0bee, 0xbfe4,
+ 0x9f7d, 0xc2f7, 0x2e59, 0xbfe6,
+ 0xf40b, 0x4bb3, 0xe7ea, 0xbfd1,
+ 0xbd8a, 0xf47d, 0x2f6e, 0xbfa9,
+ 0xe090, 0xc8d9, 0xa401, 0xbf70,
+ 0x009c, 0xaf4b, 0xe06e, 0xbf24,
+ 0x366d, 0x1d42, 0x4a78, 0xbec7,
+ 0xa2d2, 0xf68e, 0x041c, 0xbe52,
};
+
static unsigned short AFD[36] = {
-/*0x0000,0x0000,0x0000,0x3ff0,*/
-0xedf2,0x2572,0xb64b,0x402a,
-0x7b1a,0x4478,0x575c,0x4040,
-0x3410,0xa3b7,0xbc98,0x403a,
-0x9873,0x2ac9,0x5fc8,0x4022,
-0x9319,0x39de,0x9acb,0x3ff7,
-0x5a2b,0xb404,0x9dac,0x3fbd,
-0xf617,0xe03a,0x08ca,0x3f72,
-0xe73b,0xaf76,0xc8d7,0x3f13,
-0x18a7,0xb995,0x52b9,0x3e9e,
+ /*0x0000,0x0000,0x0000,0x3ff0, */
+ 0xedf2, 0x2572, 0xb64b, 0x402a,
+ 0x7b1a, 0x4478, 0x575c, 0x4040,
+ 0x3410, 0xa3b7, 0xbc98, 0x403a,
+ 0x9873, 0x2ac9, 0x5fc8, 0x4022,
+ 0x9319, 0x39de, 0x9acb, 0x3ff7,
+ 0x5a2b, 0xb404, 0x9dac, 0x3fbd,
+ 0xf617, 0xe03a, 0x08ca, 0x3f72,
+ 0xe73b, 0xaf76, 0xc8d7, 0x3f13,
+ 0x18a7, 0xb995, 0x52b9, 0x3e9e,
};
#endif
#ifdef MIEEE
static unsigned short AFN[36] = {
-0xbfc0,0xdb6c,0xd50a,0xe6fb,
-0xbfe4,0x0bee,0x9856,0x6852,
-0xbfe6,0x2e59,0xc2f7,0x9f7d,
-0xbfd1,0xe7ea,0x4bb3,0xf40b,
-0xbfa9,0x2f6e,0xf47d,0xbd8a,
-0xbf70,0xa401,0xc8d9,0xe090,
-0xbf24,0xe06e,0xaf4b,0x009c,
-0xbec7,0x4a78,0x1d42,0x366d,
-0xbe52,0x041c,0xf68e,0xa2d2,
+ 0xbfc0, 0xdb6c, 0xd50a, 0xe6fb,
+ 0xbfe4, 0x0bee, 0x9856, 0x6852,
+ 0xbfe6, 0x2e59, 0xc2f7, 0x9f7d,
+ 0xbfd1, 0xe7ea, 0x4bb3, 0xf40b,
+ 0xbfa9, 0x2f6e, 0xf47d, 0xbd8a,
+ 0xbf70, 0xa401, 0xc8d9, 0xe090,
+ 0xbf24, 0xe06e, 0xaf4b, 0x009c,
+ 0xbec7, 0x4a78, 0x1d42, 0x366d,
+ 0xbe52, 0x041c, 0xf68e, 0xa2d2,
};
+
static unsigned short AFD[36] = {
-/*0x3ff0,0x0000,0x0000,0x0000,*/
-0x402a,0xb64b,0x2572,0xedf2,
-0x4040,0x575c,0x4478,0x7b1a,
-0x403a,0xbc98,0xa3b7,0x3410,
-0x4022,0x5fc8,0x2ac9,0x9873,
-0x3ff7,0x9acb,0x39de,0x9319,
-0x3fbd,0x9dac,0xb404,0x5a2b,
-0x3f72,0x08ca,0xe03a,0xf617,
-0x3f13,0xc8d7,0xaf76,0xe73b,
-0x3e9e,0x52b9,0xb995,0x18a7,
+ /*0x3ff0,0x0000,0x0000,0x0000, */
+ 0x402a, 0xb64b, 0x2572, 0xedf2,
+ 0x4040, 0x575c, 0x4478, 0x7b1a,
+ 0x403a, 0xbc98, 0xa3b7, 0x3410,
+ 0x4022, 0x5fc8, 0x2ac9, 0x9873,
+ 0x3ff7, 0x9acb, 0x39de, 0x9319,
+ 0x3fbd, 0x9dac, 0xb404, 0x5a2b,
+ 0x3f72, 0x08ca, 0xe03a, 0xf617,
+ 0x3f13, 0xc8d7, 0xaf76, 0xe73b,
+ 0x3e9e, 0x52b9, 0xb995, 0x18a7,
};
#endif
#ifdef UNK
static double AGN[11] = {
- 1.97339932091685679179E-2,
- 3.91103029615688277255E-1,
- 1.06579897599595591108E0,
- 9.39169229816650230044E-1,
- 3.51465656105547619242E-1,
- 6.33888919628925490927E-2,
- 5.85804113048388458567E-3,
- 2.82851600836737019778E-4,
- 6.98793669997260967291E-6,
- 8.11789239554389293311E-8,
- 3.41551784765923618484E-10,
+ 1.97339932091685679179E-2,
+ 3.91103029615688277255E-1,
+ 1.06579897599595591108E0,
+ 9.39169229816650230044E-1,
+ 3.51465656105547619242E-1,
+ 6.33888919628925490927E-2,
+ 5.85804113048388458567E-3,
+ 2.82851600836737019778E-4,
+ 6.98793669997260967291E-6,
+ 8.11789239554389293311E-8,
+ 3.41551784765923618484E-10,
};
+
static double AGD[10] = {
-/* 1.00000000000000000000E0,*/
- 9.30892908077441974853E0,
- 1.98352928718312140417E1,
- 1.55646628932864612953E1,
- 5.47686069422975497931E0,
- 9.54293611618961883998E-1,
- 8.64580826352392193095E-2,
- 4.12656523824222607191E-3,
- 1.01259085116509135510E-4,
- 1.17166733214413521882E-6,
- 4.91834570062930015649E-9,
+ /* 1.00000000000000000000E0, */
+ 9.30892908077441974853E0,
+ 1.98352928718312140417E1,
+ 1.55646628932864612953E1,
+ 5.47686069422975497931E0,
+ 9.54293611618961883998E-1,
+ 8.64580826352392193095E-2,
+ 4.12656523824222607191E-3,
+ 1.01259085116509135510E-4,
+ 1.17166733214413521882E-6,
+ 4.91834570062930015649E-9,
};
#endif
#ifdef DEC
static unsigned short AGN[44] = {
-0036641,0124456,0167175,0157354,
-0037710,0037250,0001441,0136671,
-0040210,0066031,0150401,0123532,
-0040160,0066545,0003570,0153133,
-0037663,0171516,0072507,0170345,
-0037201,0151011,0007510,0045702,
-0036277,0172317,0104572,0101030,
-0035224,0045663,0000160,0136422,
-0033752,0074753,0047702,0135160,
-0032256,0052225,0156550,0107103,
-0030273,0142443,0166277,0071720,
+ 0036641, 0124456, 0167175, 0157354,
+ 0037710, 0037250, 0001441, 0136671,
+ 0040210, 0066031, 0150401, 0123532,
+ 0040160, 0066545, 0003570, 0153133,
+ 0037663, 0171516, 0072507, 0170345,
+ 0037201, 0151011, 0007510, 0045702,
+ 0036277, 0172317, 0104572, 0101030,
+ 0035224, 0045663, 0000160, 0136422,
+ 0033752, 0074753, 0047702, 0135160,
+ 0032256, 0052225, 0156550, 0107103,
+ 0030273, 0142443, 0166277, 0071720,
};
+
static unsigned short AGD[40] = {
-/*0040200,0000000,0000000,0000000,*/
-0041024,0170537,0117253,0055003,
-0041236,0127256,0003570,0143240,
-0041171,0004333,0172476,0160645,
-0040657,0041161,0055716,0157161,
-0040164,0046226,0006257,0063431,
-0037261,0010357,0065445,0047563,
-0036207,0034043,0057434,0116732,
-0034724,0055416,0130035,0026377,
-0033235,0041056,0154071,0023502,
-0031250,0177071,0167254,0047242,
+ /*0040200,0000000,0000000,0000000, */
+ 0041024, 0170537, 0117253, 0055003,
+ 0041236, 0127256, 0003570, 0143240,
+ 0041171, 0004333, 0172476, 0160645,
+ 0040657, 0041161, 0055716, 0157161,
+ 0040164, 0046226, 0006257, 0063431,
+ 0037261, 0010357, 0065445, 0047563,
+ 0036207, 0034043, 0057434, 0116732,
+ 0034724, 0055416, 0130035, 0026377,
+ 0033235, 0041056, 0154071, 0023502,
+ 0031250, 0177071, 0167254, 0047242,
};
#endif
#ifdef IBMPC
static unsigned short AGN[44] = {
-0xbbde,0xddcf,0x3525,0x3f94,
-0x37b7,0x0064,0x07d5,0x3fd9,
-0x34eb,0x3a20,0x0d83,0x3ff1,
-0x1acb,0xa0ef,0x0dac,0x3fee,
-0xfe1d,0xcea8,0x7e69,0x3fd6,
-0x0978,0x21e9,0x3a41,0x3fb0,
-0x5043,0xf12f,0xfe99,0x3f77,
-0x17a2,0x600e,0x8976,0x3f32,
-0x574e,0x69f8,0x4f3d,0x3edd,
-0x11c8,0xbbad,0xca92,0x3e75,
-0xee7a,0x7d97,0x78a4,0x3df7,
+ 0xbbde, 0xddcf, 0x3525, 0x3f94,
+ 0x37b7, 0x0064, 0x07d5, 0x3fd9,
+ 0x34eb, 0x3a20, 0x0d83, 0x3ff1,
+ 0x1acb, 0xa0ef, 0x0dac, 0x3fee,
+ 0xfe1d, 0xcea8, 0x7e69, 0x3fd6,
+ 0x0978, 0x21e9, 0x3a41, 0x3fb0,
+ 0x5043, 0xf12f, 0xfe99, 0x3f77,
+ 0x17a2, 0x600e, 0x8976, 0x3f32,
+ 0x574e, 0x69f8, 0x4f3d, 0x3edd,
+ 0x11c8, 0xbbad, 0xca92, 0x3e75,
+ 0xee7a, 0x7d97, 0x78a4, 0x3df7,
};
+
static unsigned short AGD[40] = {
-/*0x0000,0x0000,0x0000,0x3ff0,*/
-0x6b40,0xf3d5,0x9e2b,0x4022,
-0x18d4,0xc0ef,0xd5d5,0x4033,
-0xdc35,0x7ea7,0x211b,0x402f,
-0xdbce,0x2b79,0xe84e,0x4015,
-0xece3,0xc195,0x8992,0x3fee,
-0xa9ee,0xed64,0x221d,0x3fb6,
-0x93bb,0x6be3,0xe704,0x3f70,
-0xa5a0,0xd603,0x8b61,0x3f1a,
-0x24e8,0xdb07,0xa845,0x3eb3,
-0x89d4,0x3dd5,0x1fc7,0x3e35,
+ /*0x0000,0x0000,0x0000,0x3ff0, */
+ 0x6b40, 0xf3d5, 0x9e2b, 0x4022,
+ 0x18d4, 0xc0ef, 0xd5d5, 0x4033,
+ 0xdc35, 0x7ea7, 0x211b, 0x402f,
+ 0xdbce, 0x2b79, 0xe84e, 0x4015,
+ 0xece3, 0xc195, 0x8992, 0x3fee,
+ 0xa9ee, 0xed64, 0x221d, 0x3fb6,
+ 0x93bb, 0x6be3, 0xe704, 0x3f70,
+ 0xa5a0, 0xd603, 0x8b61, 0x3f1a,
+ 0x24e8, 0xdb07, 0xa845, 0x3eb3,
+ 0x89d4, 0x3dd5, 0x1fc7, 0x3e35,
};
#endif
#ifdef MIEEE
static unsigned short AGN[44] = {
-0x3f94,0x3525,0xddcf,0xbbde,
-0x3fd9,0x07d5,0x0064,0x37b7,
-0x3ff1,0x0d83,0x3a20,0x34eb,
-0x3fee,0x0dac,0xa0ef,0x1acb,
-0x3fd6,0x7e69,0xcea8,0xfe1d,
-0x3fb0,0x3a41,0x21e9,0x0978,
-0x3f77,0xfe99,0xf12f,0x5043,
-0x3f32,0x8976,0x600e,0x17a2,
-0x3edd,0x4f3d,0x69f8,0x574e,
-0x3e75,0xca92,0xbbad,0x11c8,
-0x3df7,0x78a4,0x7d97,0xee7a,
+ 0x3f94, 0x3525, 0xddcf, 0xbbde,
+ 0x3fd9, 0x07d5, 0x0064, 0x37b7,
+ 0x3ff1, 0x0d83, 0x3a20, 0x34eb,
+ 0x3fee, 0x0dac, 0xa0ef, 0x1acb,
+ 0x3fd6, 0x7e69, 0xcea8, 0xfe1d,
+ 0x3fb0, 0x3a41, 0x21e9, 0x0978,
+ 0x3f77, 0xfe99, 0xf12f, 0x5043,
+ 0x3f32, 0x8976, 0x600e, 0x17a2,
+ 0x3edd, 0x4f3d, 0x69f8, 0x574e,
+ 0x3e75, 0xca92, 0xbbad, 0x11c8,
+ 0x3df7, 0x78a4, 0x7d97, 0xee7a,
};
+
static unsigned short AGD[40] = {
-/*0x3ff0,0x0000,0x0000,0x0000,*/
-0x4022,0x9e2b,0xf3d5,0x6b40,
-0x4033,0xd5d5,0xc0ef,0x18d4,
-0x402f,0x211b,0x7ea7,0xdc35,
-0x4015,0xe84e,0x2b79,0xdbce,
-0x3fee,0x8992,0xc195,0xece3,
-0x3fb6,0x221d,0xed64,0xa9ee,
-0x3f70,0xe704,0x6be3,0x93bb,
-0x3f1a,0x8b61,0xd603,0xa5a0,
-0x3eb3,0xa845,0xdb07,0x24e8,
-0x3e35,0x1fc7,0x3dd5,0x89d4,
+ /*0x3ff0,0x0000,0x0000,0x0000, */
+ 0x4022, 0x9e2b, 0xf3d5, 0x6b40,
+ 0x4033, 0xd5d5, 0xc0ef, 0x18d4,
+ 0x402f, 0x211b, 0x7ea7, 0xdc35,
+ 0x4015, 0xe84e, 0x2b79, 0xdbce,
+ 0x3fee, 0x8992, 0xc195, 0xece3,
+ 0x3fb6, 0x221d, 0xed64, 0xa9ee,
+ 0x3f70, 0xe704, 0x6be3, 0x93bb,
+ 0x3f1a, 0x8b61, 0xd603, 0xa5a0,
+ 0x3eb3, 0xa845, 0xdb07, 0x24e8,
+ 0x3e35, 0x1fc7, 0x3dd5, 0x89d4,
};
#endif
#ifdef UNK
static double APFN[9] = {
- 1.85365624022535566142E-1,
- 8.86712188052584095637E-1,
- 9.87391981747398547272E-1,
- 4.01241082318003734092E-1,
- 7.10304926289631174579E-2,
- 5.90618657995661810071E-3,
- 2.33051409401776799569E-4,
- 4.08718778289035454598E-6,
- 2.48379932900442457853E-8,
+ 1.85365624022535566142E-1,
+ 8.86712188052584095637E-1,
+ 9.87391981747398547272E-1,
+ 4.01241082318003734092E-1,
+ 7.10304926289631174579E-2,
+ 5.90618657995661810071E-3,
+ 2.33051409401776799569E-4,
+ 4.08718778289035454598E-6,
+ 2.48379932900442457853E-8,
};
+
static double APFD[9] = {
-/* 1.00000000000000000000E0,*/
- 1.47345854687502542552E1,
- 3.75423933435489594466E1,
- 3.14657751203046424330E1,
- 1.09969125207298778536E1,
- 1.78885054766999417817E0,
- 1.41733275753662636873E-1,
- 5.44066067017226003627E-3,
- 9.39421290654511171663E-5,
- 5.65978713036027009243E-7,
+ /* 1.00000000000000000000E0, */
+ 1.47345854687502542552E1,
+ 3.75423933435489594466E1,
+ 3.14657751203046424330E1,
+ 1.09969125207298778536E1,
+ 1.78885054766999417817E0,
+ 1.41733275753662636873E-1,
+ 5.44066067017226003627E-3,
+ 9.39421290654511171663E-5,
+ 5.65978713036027009243E-7,
};
#endif
#ifdef DEC
static unsigned short APFN[36] = {
-0037475,0150174,0071752,0166651,
-0040142,0177621,0164246,0101757,
-0040174,0142670,0106760,0006573,
-0037715,0067570,0116274,0022404,
-0037221,0074157,0053341,0117207,
-0036301,0104257,0015075,0004777,
-0035164,0057502,0164034,0001313,
-0033611,0022254,0176000,0112565,
-0031725,0055523,0025153,0166057,
+ 0037475, 0150174, 0071752, 0166651,
+ 0040142, 0177621, 0164246, 0101757,
+ 0040174, 0142670, 0106760, 0006573,
+ 0037715, 0067570, 0116274, 0022404,
+ 0037221, 0074157, 0053341, 0117207,
+ 0036301, 0104257, 0015075, 0004777,
+ 0035164, 0057502, 0164034, 0001313,
+ 0033611, 0022254, 0176000, 0112565,
+ 0031725, 0055523, 0025153, 0166057,
};
+
static unsigned short APFD[36] = {
-/*0040200,0000000,0000000,0000000,*/
-0041153,0140334,0130506,0061402,
-0041426,0025551,0024440,0070611,
-0041373,0134750,0047147,0176702,
-0041057,0171532,0105430,0017674,
-0040344,0174416,0001726,0047754,
-0037421,0021207,0020167,0136264,
-0036262,0043621,0151321,0124324,
-0034705,0001313,0163733,0016407,
-0033027,0166702,0150440,0170561,
+ /*0040200,0000000,0000000,0000000, */
+ 0041153, 0140334, 0130506, 0061402,
+ 0041426, 0025551, 0024440, 0070611,
+ 0041373, 0134750, 0047147, 0176702,
+ 0041057, 0171532, 0105430, 0017674,
+ 0040344, 0174416, 0001726, 0047754,
+ 0037421, 0021207, 0020167, 0136264,
+ 0036262, 0043621, 0151321, 0124324,
+ 0034705, 0001313, 0163733, 0016407,
+ 0033027, 0166702, 0150440, 0170561,
};
#endif
#ifdef IBMPC
static unsigned short APFN[36] = {
-0x5db5,0x8e7d,0xba0f,0x3fc7,
-0xd07e,0x3d14,0x5ff2,0x3fec,
-0x01af,0x11be,0x98b7,0x3fef,
-0x84a1,0x1397,0xadef,0x3fd9,
-0x33d1,0xeadc,0x2f0d,0x3fb2,
-0xa140,0xe347,0x3115,0x3f78,
-0x8059,0x5d03,0x8be8,0x3f2e,
-0x12af,0x9f80,0x2495,0x3ed1,
-0x7d86,0x654d,0xab6a,0x3e5a,
+ 0x5db5, 0x8e7d, 0xba0f, 0x3fc7,
+ 0xd07e, 0x3d14, 0x5ff2, 0x3fec,
+ 0x01af, 0x11be, 0x98b7, 0x3fef,
+ 0x84a1, 0x1397, 0xadef, 0x3fd9,
+ 0x33d1, 0xeadc, 0x2f0d, 0x3fb2,
+ 0xa140, 0xe347, 0x3115, 0x3f78,
+ 0x8059, 0x5d03, 0x8be8, 0x3f2e,
+ 0x12af, 0x9f80, 0x2495, 0x3ed1,
+ 0x7d86, 0x654d, 0xab6a, 0x3e5a,
};
+
static unsigned short APFD[36] = {
-/*0x0000,0x0000,0x0000,0x3ff0,*/
-0xcc60,0x9628,0x781b,0x402d,
-0x0e31,0x2524,0xc56d,0x4042,
-0xffb8,0x09cc,0x773d,0x403f,
-0x03f7,0x5163,0xfe6b,0x4025,
-0xc9fd,0xc07a,0x9f21,0x3ffc,
-0xf796,0xe40e,0x2450,0x3fc2,
-0x351a,0x3a5a,0x48f2,0x3f76,
-0x63a1,0x7cfb,0xa059,0x3f18,
-0x1e2e,0x5a24,0xfdb8,0x3ea2,
+ /*0x0000,0x0000,0x0000,0x3ff0, */
+ 0xcc60, 0x9628, 0x781b, 0x402d,
+ 0x0e31, 0x2524, 0xc56d, 0x4042,
+ 0xffb8, 0x09cc, 0x773d, 0x403f,
+ 0x03f7, 0x5163, 0xfe6b, 0x4025,
+ 0xc9fd, 0xc07a, 0x9f21, 0x3ffc,
+ 0xf796, 0xe40e, 0x2450, 0x3fc2,
+ 0x351a, 0x3a5a, 0x48f2, 0x3f76,
+ 0x63a1, 0x7cfb, 0xa059, 0x3f18,
+ 0x1e2e, 0x5a24, 0xfdb8, 0x3ea2,
};
#endif
#ifdef MIEEE
static unsigned short APFN[36] = {
-0x3fc7,0xba0f,0x8e7d,0x5db5,
-0x3fec,0x5ff2,0x3d14,0xd07e,
-0x3fef,0x98b7,0x11be,0x01af,
-0x3fd9,0xadef,0x1397,0x84a1,
-0x3fb2,0x2f0d,0xeadc,0x33d1,
-0x3f78,0x3115,0xe347,0xa140,
-0x3f2e,0x8be8,0x5d03,0x8059,
-0x3ed1,0x2495,0x9f80,0x12af,
-0x3e5a,0xab6a,0x654d,0x7d86,
+ 0x3fc7, 0xba0f, 0x8e7d, 0x5db5,
+ 0x3fec, 0x5ff2, 0x3d14, 0xd07e,
+ 0x3fef, 0x98b7, 0x11be, 0x01af,
+ 0x3fd9, 0xadef, 0x1397, 0x84a1,
+ 0x3fb2, 0x2f0d, 0xeadc, 0x33d1,
+ 0x3f78, 0x3115, 0xe347, 0xa140,
+ 0x3f2e, 0x8be8, 0x5d03, 0x8059,
+ 0x3ed1, 0x2495, 0x9f80, 0x12af,
+ 0x3e5a, 0xab6a, 0x654d, 0x7d86,
};
+
static unsigned short APFD[36] = {
-/*0x3ff0,0x0000,0x0000,0x0000,*/
-0x402d,0x781b,0x9628,0xcc60,
-0x4042,0xc56d,0x2524,0x0e31,
-0x403f,0x773d,0x09cc,0xffb8,
-0x4025,0xfe6b,0x5163,0x03f7,
-0x3ffc,0x9f21,0xc07a,0xc9fd,
-0x3fc2,0x2450,0xe40e,0xf796,
-0x3f76,0x48f2,0x3a5a,0x351a,
-0x3f18,0xa059,0x7cfb,0x63a1,
-0x3ea2,0xfdb8,0x5a24,0x1e2e,
+ /*0x3ff0,0x0000,0x0000,0x0000, */
+ 0x402d, 0x781b, 0x9628, 0xcc60,
+ 0x4042, 0xc56d, 0x2524, 0x0e31,
+ 0x403f, 0x773d, 0x09cc, 0xffb8,
+ 0x4025, 0xfe6b, 0x5163, 0x03f7,
+ 0x3ffc, 0x9f21, 0xc07a, 0xc9fd,
+ 0x3fc2, 0x2450, 0xe40e, 0xf796,
+ 0x3f76, 0x48f2, 0x3a5a, 0x351a,
+ 0x3f18, 0xa059, 0x7cfb, 0x63a1,
+ 0x3ea2, 0xfdb8, 0x5a24, 0x1e2e,
};
#endif
#ifdef UNK
static double APGN[11] = {
--3.55615429033082288335E-2,
--6.37311518129435504426E-1,
--1.70856738884312371053E0,
--1.50221872117316635393E0,
--5.63606665822102676611E-1,
--1.02101031120216891789E-1,
--9.48396695961445269093E-3,
--4.60325307486780994357E-4,
--1.14300836484517375919E-5,
--1.33415518685547420648E-7,
--5.63803833958893494476E-10,
+ -3.55615429033082288335E-2,
+ -6.37311518129435504426E-1,
+ -1.70856738884312371053E0,
+ -1.50221872117316635393E0,
+ -5.63606665822102676611E-1,
+ -1.02101031120216891789E-1,
+ -9.48396695961445269093E-3,
+ -4.60325307486780994357E-4,
+ -1.14300836484517375919E-5,
+ -1.33415518685547420648E-7,
+ -5.63803833958893494476E-10,
};
+
static double APGD[11] = {
-/* 1.00000000000000000000E0,*/
- 9.85865801696130355144E0,
- 2.16401867356585941885E1,
- 1.73130776389749389525E1,
- 6.17872175280828766327E0,
- 1.08848694396321495475E0,
- 9.95005543440888479402E-2,
- 4.78468199683886610842E-3,
- 1.18159633322838625562E-4,
- 1.37480673554219441465E-6,
- 5.79912514929147598821E-9,
+ /* 1.00000000000000000000E0, */
+ 9.85865801696130355144E0,
+ 2.16401867356585941885E1,
+ 1.73130776389749389525E1,
+ 6.17872175280828766327E0,
+ 1.08848694396321495475E0,
+ 9.95005543440888479402E-2,
+ 4.78468199683886610842E-3,
+ 1.18159633322838625562E-4,
+ 1.37480673554219441465E-6,
+ 5.79912514929147598821E-9,
};
#endif
#ifdef DEC
static unsigned short APGN[44] = {
-0137021,0124372,0176075,0075331,
-0140043,0023330,0177672,0161655,
-0140332,0131126,0010413,0171112,
-0140300,0044263,0175560,0054070,
-0140020,0044206,0142603,0073324,
-0137321,0015130,0066144,0144033,
-0136433,0061243,0175542,0103373,
-0135361,0053721,0020441,0053203,
-0134077,0141725,0160277,0130612,
-0132417,0040372,0100363,0060200,
-0130432,0175052,0171064,0034147,
+ 0137021, 0124372, 0176075, 0075331,
+ 0140043, 0023330, 0177672, 0161655,
+ 0140332, 0131126, 0010413, 0171112,
+ 0140300, 0044263, 0175560, 0054070,
+ 0140020, 0044206, 0142603, 0073324,
+ 0137321, 0015130, 0066144, 0144033,
+ 0136433, 0061243, 0175542, 0103373,
+ 0135361, 0053721, 0020441, 0053203,
+ 0134077, 0141725, 0160277, 0130612,
+ 0132417, 0040372, 0100363, 0060200,
+ 0130432, 0175052, 0171064, 0034147,
};
+
static unsigned short APGD[40] = {
-/*0040200,0000000,0000000,0000000,*/
-0041035,0136420,0030124,0140220,
-0041255,0017432,0034447,0162256,
-0041212,0100456,0154544,0006321,
-0040705,0134026,0127154,0123414,
-0040213,0051612,0044470,0172607,
-0037313,0143362,0053273,0157051,
-0036234,0144322,0054536,0007264,
-0034767,0146170,0054265,0170342,
-0033270,0102777,0167362,0073631,
-0031307,0040644,0167103,0021763,
+ /*0040200,0000000,0000000,0000000, */
+ 0041035, 0136420, 0030124, 0140220,
+ 0041255, 0017432, 0034447, 0162256,
+ 0041212, 0100456, 0154544, 0006321,
+ 0040705, 0134026, 0127154, 0123414,
+ 0040213, 0051612, 0044470, 0172607,
+ 0037313, 0143362, 0053273, 0157051,
+ 0036234, 0144322, 0054536, 0007264,
+ 0034767, 0146170, 0054265, 0170342,
+ 0033270, 0102777, 0167362, 0073631,
+ 0031307, 0040644, 0167103, 0021763,
};
#endif
#ifdef IBMPC
static unsigned short APGN[44] = {
-0xaf5b,0x5f87,0x351f,0xbfa2,
-0x5c76,0x1ff7,0x64db,0xbfe4,
-0x7e49,0xc221,0x564a,0xbffb,
-0x0b07,0x7f6e,0x0916,0xbff8,
-0x6edb,0xd8b0,0x0910,0xbfe2,
-0x9903,0x0d8c,0x234b,0xbfba,
-0x50df,0x7f6c,0x6c54,0xbf83,
-0x2ad0,0x2424,0x2afa,0xbf3e,
-0xf631,0xbc17,0xf87a,0xbee7,
-0x6c10,0x501e,0xe81f,0xbe81,
-0x870d,0x5e46,0x5f45,0xbe03,
+ 0xaf5b, 0x5f87, 0x351f, 0xbfa2,
+ 0x5c76, 0x1ff7, 0x64db, 0xbfe4,
+ 0x7e49, 0xc221, 0x564a, 0xbffb,
+ 0x0b07, 0x7f6e, 0x0916, 0xbff8,
+ 0x6edb, 0xd8b0, 0x0910, 0xbfe2,
+ 0x9903, 0x0d8c, 0x234b, 0xbfba,
+ 0x50df, 0x7f6c, 0x6c54, 0xbf83,
+ 0x2ad0, 0x2424, 0x2afa, 0xbf3e,
+ 0xf631, 0xbc17, 0xf87a, 0xbee7,
+ 0x6c10, 0x501e, 0xe81f, 0xbe81,
+ 0x870d, 0x5e46, 0x5f45, 0xbe03,
};
+
static unsigned short APGD[40] = {
-/*0x0000,0x0000,0x0000,0x3ff0,*/
-0x9812,0x060a,0xb7a2,0x4023,
-0xfc96,0x4724,0xa3e3,0x4035,
-0x819a,0xdb2c,0x5025,0x4031,
-0x94e2,0xd5cd,0xb702,0x4018,
-0x1eb1,0x4927,0x6a71,0x3ff1,
-0x7bc5,0x4ad7,0x78de,0x3fb9,
-0xc1d7,0x4b2b,0x991a,0x3f73,
-0xbe1c,0x0b16,0xf98f,0x3f1e,
-0x4ef3,0xfdde,0x10bf,0x3eb7,
-0x647e,0x9dc8,0xe834,0x3e38,
+ /*0x0000,0x0000,0x0000,0x3ff0, */
+ 0x9812, 0x060a, 0xb7a2, 0x4023,
+ 0xfc96, 0x4724, 0xa3e3, 0x4035,
+ 0x819a, 0xdb2c, 0x5025, 0x4031,
+ 0x94e2, 0xd5cd, 0xb702, 0x4018,
+ 0x1eb1, 0x4927, 0x6a71, 0x3ff1,
+ 0x7bc5, 0x4ad7, 0x78de, 0x3fb9,
+ 0xc1d7, 0x4b2b, 0x991a, 0x3f73,
+ 0xbe1c, 0x0b16, 0xf98f, 0x3f1e,
+ 0x4ef3, 0xfdde, 0x10bf, 0x3eb7,
+ 0x647e, 0x9dc8, 0xe834, 0x3e38,
};
#endif
#ifdef MIEEE
static unsigned short APGN[44] = {
-0xbfa2,0x351f,0x5f87,0xaf5b,
-0xbfe4,0x64db,0x1ff7,0x5c76,
-0xbffb,0x564a,0xc221,0x7e49,
-0xbff8,0x0916,0x7f6e,0x0b07,
-0xbfe2,0x0910,0xd8b0,0x6edb,
-0xbfba,0x234b,0x0d8c,0x9903,
-0xbf83,0x6c54,0x7f6c,0x50df,
-0xbf3e,0x2afa,0x2424,0x2ad0,
-0xbee7,0xf87a,0xbc17,0xf631,
-0xbe81,0xe81f,0x501e,0x6c10,
-0xbe03,0x5f45,0x5e46,0x870d,
+ 0xbfa2, 0x351f, 0x5f87, 0xaf5b,
+ 0xbfe4, 0x64db, 0x1ff7, 0x5c76,
+ 0xbffb, 0x564a, 0xc221, 0x7e49,
+ 0xbff8, 0x0916, 0x7f6e, 0x0b07,
+ 0xbfe2, 0x0910, 0xd8b0, 0x6edb,
+ 0xbfba, 0x234b, 0x0d8c, 0x9903,
+ 0xbf83, 0x6c54, 0x7f6c, 0x50df,
+ 0xbf3e, 0x2afa, 0x2424, 0x2ad0,
+ 0xbee7, 0xf87a, 0xbc17, 0xf631,
+ 0xbe81, 0xe81f, 0x501e, 0x6c10,
+ 0xbe03, 0x5f45, 0x5e46, 0x870d,
};
+
static unsigned short APGD[40] = {
-/*0x3ff0,0x0000,0x0000,0x0000,*/
-0x4023,0xb7a2,0x060a,0x9812,
-0x4035,0xa3e3,0x4724,0xfc96,
-0x4031,0x5025,0xdb2c,0x819a,
-0x4018,0xb702,0xd5cd,0x94e2,
-0x3ff1,0x6a71,0x4927,0x1eb1,
-0x3fb9,0x78de,0x4ad7,0x7bc5,
-0x3f73,0x991a,0x4b2b,0xc1d7,
-0x3f1e,0xf98f,0x0b16,0xbe1c,
-0x3eb7,0x10bf,0xfdde,0x4ef3,
-0x3e38,0xe834,0x9dc8,0x647e,
+ /*0x3ff0,0x0000,0x0000,0x0000, */
+ 0x4023, 0xb7a2, 0x060a, 0x9812,
+ 0x4035, 0xa3e3, 0x4724, 0xfc96,
+ 0x4031, 0x5025, 0xdb2c, 0x819a,
+ 0x4018, 0xb702, 0xd5cd, 0x94e2,
+ 0x3ff1, 0x6a71, 0x4927, 0x1eb1,
+ 0x3fb9, 0x78de, 0x4ad7, 0x7bc5,
+ 0x3f73, 0x991a, 0x4b2b, 0xc1d7,
+ 0x3f1e, 0xf98f, 0x0b16, 0xbe1c,
+ 0x3eb7, 0x10bf, 0xfdde, 0x4ef3,
+ 0x3e38, 0xe834, 0x9dc8, 0x647e,
};
#endif
-int airy( x, ai, aip, bi, bip )
+int airy(x, ai, aip, bi, bip)
double x, *ai, *aip, *bi, *bip;
{
-double z, zz, t, f, g, uf, ug, k, zeta, theta;
-int domflg;
+ double z, zz, t, f, g, uf, ug, k, zeta, theta;
+ int domflg;
-domflg = 0;
-if( x > MAXAIRY )
- {
+ domflg = 0;
+ if (x > MAXAIRY) {
*ai = 0;
*aip = 0;
- *bi = MAXNUM;
- *bip = MAXNUM;
- return(-1);
- }
+ *bi = NPY_INFINITY;
+ *bip = NPY_INFINITY;
+ return (-1);
+ }
-if( x < -2.09 )
- {
+ if (x < -2.09) {
domflg = 15;
t = sqrt(-x);
zeta = -2.0 * x * t / 3.0;
t = sqrt(t);
k = sqpii / t;
- z = 1.0/zeta;
+ z = 1.0 / zeta;
zz = z * z;
- uf = 1.0 + zz * polevl( zz, AFN, 8 ) / p1evl( zz, AFD, 9 );
- ug = z * polevl( zz, AGN, 10 ) / p1evl( zz, AGD, 10 );
- theta = zeta + 0.25 * PI;
- f = sin( theta );
- g = cos( theta );
+ uf = 1.0 + zz * polevl(zz, AFN, 8) / p1evl(zz, AFD, 9);
+ ug = z * polevl(zz, AGN, 10) / p1evl(zz, AGD, 10);
+ theta = zeta + 0.25 * NPY_PI;
+ f = sin(theta);
+ g = cos(theta);
*ai = k * (f * uf - g * ug);
*bi = k * (g * uf + f * ug);
- uf = 1.0 + zz * polevl( zz, APFN, 8 ) / p1evl( zz, APFD, 9 );
- ug = z * polevl( zz, APGN, 10 ) / p1evl( zz, APGD, 10 );
+ uf = 1.0 + zz * polevl(zz, APFN, 8) / p1evl(zz, APFD, 9);
+ ug = z * polevl(zz, APGN, 10) / p1evl(zz, APGD, 10);
k = sqpii * t;
*aip = -k * (g * uf + f * ug);
*bip = k * (f * uf - g * ug);
- return(0);
- }
+ return (0);
+ }
-if( x >= 2.09 ) /* cbrt(9) */
- {
+ if (x >= 2.09) { /* cbrt(9) */
domflg = 5;
t = sqrt(x);
zeta = 2.0 * x * t / 3.0;
- g = exp( zeta );
+ g = exp(zeta);
t = sqrt(t);
k = 2.0 * t * g;
- z = 1.0/zeta;
- f = polevl( z, AN, 7 ) / polevl( z, AD, 7 );
+ z = 1.0 / zeta;
+ f = polevl(z, AN, 7) / polevl(z, AD, 7);
*ai = sqpii * f / k;
k = -0.5 * sqpii * t / g;
- f = polevl( z, APN, 7 ) / polevl( z, APD, 7 );
+ f = polevl(z, APN, 7) / polevl(z, APD, 7);
*aip = f * k;
- if( x > 8.3203353 ) /* zeta > 16 */
- {
- f = z * polevl( z, BN16, 4 ) / p1evl( z, BD16, 5 );
- k = sqpii * g;
- *bi = k * (1.0 + f) / t;
- f = z * polevl( z, BPPN, 4 ) / p1evl( z, BPPD, 5 );
- *bip = k * t * (1.0 + f);
- return(0);
- }
+ if (x > 8.3203353) { /* zeta > 16 */
+ f = z * polevl(z, BN16, 4) / p1evl(z, BD16, 5);
+ k = sqpii * g;
+ *bi = k * (1.0 + f) / t;
+ f = z * polevl(z, BPPN, 4) / p1evl(z, BPPD, 5);
+ *bip = k * t * (1.0 + f);
+ return (0);
}
+ }
-f = 1.0;
-g = x;
-t = 1.0;
-uf = 1.0;
-ug = x;
-k = 1.0;
-z = x * x * x;
-while( t > MACHEP )
- {
+ f = 1.0;
+ g = x;
+ t = 1.0;
+ uf = 1.0;
+ ug = x;
+ k = 1.0;
+ z = x * x * x;
+ while (t > MACHEP) {
uf *= z;
k += 1.0;
- uf /=k;
+ uf /= k;
ug *= z;
k += 1.0;
- ug /=k;
- uf /=k;
+ ug /= k;
+ uf /= k;
f += uf;
k += 1.0;
- ug /=k;
+ ug /= k;
g += ug;
- t = fabs(uf/f);
- }
-uf = c1 * f;
-ug = c2 * g;
-if( (domflg & 1) == 0 )
+ t = fabs(uf / f);
+ }
+ uf = c1 * f;
+ ug = c2 * g;
+ if ((domflg & 1) == 0)
*ai = uf - ug;
-if( (domflg & 2) == 0 )
+ if ((domflg & 2) == 0)
*bi = sqrt3 * (uf + ug);
-/* the deriviative of ai */
-k = 4.0;
-uf = x * x/2.0;
-ug = z/3.0;
-f = uf;
-g = 1.0 + ug;
-uf /= 3.0;
-t = 1.0;
-
-while( t > MACHEP )
- {
+ /* the deriviative of ai */
+ k = 4.0;
+ uf = x * x / 2.0;
+ ug = z / 3.0;
+ f = uf;
+ g = 1.0 + ug;
+ uf /= 3.0;
+ t = 1.0;
+
+ while (t > MACHEP) {
uf *= z;
- ug /=k;
+ ug /= k;
k += 1.0;
ug *= z;
- uf /=k;
+ uf /= k;
f += uf;
k += 1.0;
- ug /=k;
- uf /=k;
+ ug /= k;
+ uf /= k;
g += ug;
k += 1.0;
- t = fabs(ug/g);
- }
+ t = fabs(ug / g);
+ }
-uf = c1 * f;
-ug = c2 * g;
-if( (domflg & 4) == 0 )
+ uf = c1 * f;
+ ug = c2 * g;
+ if ((domflg & 4) == 0)
*aip = uf - ug;
-if( (domflg & 8) == 0 )
+ if ((domflg & 8) == 0)
*bip = sqrt3 * (uf + ug);
-return(0);
+ return (0);
}
View
153 scipy/special/cephes/bdtr.c
@@ -1,6 +1,6 @@
-/* bdtr.c
+/* bdtr.c
*
- * Binomial distribution
+ * Binomial distribution
*
*
*
@@ -138,117 +138,108 @@
* x < 0, x > 1
*/
-/* bdtr() */
+/* bdtr() */
/*
-Cephes Math Library Release 2.3: March, 1995
-Copyright 1984, 1987, 1995 by Stephen L. Moshier
-*/
+ * Cephes Math Library Release 2.3: March, 1995
+ * Copyright 1984, 1987, 1995 by Stephen L. Moshier
+ */
#include "mconf.h"
-double bdtrc( k, n, p )
+double bdtrc(k, n, p)
int k, n;
double p;
{
-double dk, dn;
+ double dk, dn;
-if( (p < 0.0) || (p > 1.0) )
+ if ((p < 0.0) || (p > 1.0))
goto domerr;
-if( k < 0 )
- return( 1.0 );
-
-if( n < k )
- {
-domerr:
- mtherr( "bdtrc", DOMAIN );
- return( NPY_NAN);
- }
-
-if( k == n )
- return( 0.0 );
-dn = n - k;
-if( k == 0 )
- {
- if( p < .01 )
- dk = -expm1( dn * log1p(-p) );
+ if (k < 0)
+ return (1.0);
+
+ if (n < k) {
+ domerr:
+ mtherr("bdtrc", DOMAIN);
+ return (NPY_NAN);
+ }
+
+ if (k == n)
+ return (0.0);
+ dn = n - k;
+ if (k == 0) {
+ if (p < .01)
+ dk = -expm1(dn * log1p(-p));
else
- dk = 1.0 - pow( 1.0-p, dn );
- }
-else
- {
+ dk = 1.0 - pow(1.0 - p, dn);
+ }
+ else {
dk = k + 1;
- dk = incbet( dk, dn, p );
- }
-return( dk );
+ dk = incbet(dk, dn, p);
+ }
+ return (dk);
}
-double bdtr( k, n, p )
+double bdtr(k, n, p)
int k, n;
double p;
{
-double dk, dn;
+ double dk, dn;
-if( (p < 0.0) || (p > 1.0) )
+ if ((p < 0.0) || (p > 1.0))
goto domerr;
-if( (k < 0) || (n < k) )
- {
-domerr:
- mtherr( "bdtr", DOMAIN );
- return( NPY_NAN );
- }
-
-if( k == n )
- return( 1.0 );
-
-dn = n - k;
-if( k == 0 )
- {
- dk = pow( 1.0-p, dn );
- }
-else
- {
+ if ((k < 0) || (n < k)) {
+ domerr:
+ mtherr("bdtr", DOMAIN);
+ return (NPY_NAN);
+ }
+
+ if (k == n)
+ return (1.0);
+
+ dn = n - k;
+ if (k == 0) {
+ dk = pow(1.0 - p, dn);
+ }
+ else {
dk = k + 1;
- dk = incbet( dn, dk, 1.0 - p );
- }
-return( dk );
+ dk = incbet(dn, dk, 1.0 - p);
+ }
+ return (dk);
}
-double bdtri( k, n, y )
+double bdtri(k, n, y)
int k, n;
double y;
{
-double dk, dn, p;
+ double dk, dn, p;
-if( (y < 0.0) || (y > 1.0) )
+ if ((y < 0.0) || (y > 1.0))
goto domerr;
-if( (k < 0) || (n <= k) )
- {
-domerr:
- mtherr( "bdtri", DOMAIN );
- return( NPY_NAN );
- }
-
-dn = n - k;
-if( k == 0 )
- {
- if( y > 0.8 )
- p = -expm1( log1p(y-1.0) / dn );
+ if ((k < 0) || (n <= k)) {
+ domerr:
+ mtherr("bdtri", DOMAIN);
+ return (NPY_NAN);
+ }
+
+ dn = n - k;
+ if (k == 0) {
+ if (y > 0.8)
+ p = -expm1(log1p(y - 1.0) / dn);
else
- p = 1.0 - pow( y, 1.0/dn );
- }
-else
- {
+ p = 1.0 - pow(y, 1.0 / dn);
+ }
+ else {
dk = k + 1;
- p = incbet( dn, dk, 0.5 );
- if( p > 0.5 )
- p = incbi( dk, dn, 1.0-y );
+ p = incbet(dn, dk, 0.5);
+ if (p > 0.5)
+ p = incbi(dk, dn, 1.0 - y);
else
- p = 1.0 - incbi( dn, dk, y );
- }
-return( p );
+ p = 1.0 - incbi(dn, dk, y);
+ }
+ return (p);
}
View
165 scipy/special/cephes/beta.c
@@ -1,6 +1,6 @@
-/* beta.c
+/* beta.c
*
- * Beta function
+ * Beta function
*
*
*
@@ -40,14 +40,14 @@
*
*/
-/* beta.c */
+/* beta.c */
/*
-Cephes Math Library Release 2.0: April, 1987
-Copyright 1984, 1987 by Stephen L. Moshier
-Direct inquiries to 30 Frost Street, Cambridge, MA 02140
-*/
+ * Cephes Math Library Release 2.0: April, 1987
+ * Copyright 1984, 1987 by Stephen L. Moshier
+ * Direct inquiries to 30 Frost Street, Cambridge, MA 02140
+ */
#include "mconf.h"
@@ -64,128 +64,115 @@ Direct inquiries to 30 Frost Street, Cambridge, MA 02140
#define MAXGAM 171.624376956302725
#endif
-extern double MAXLOG, MAXNUM;
+extern double MAXLOG;
extern int sgngam;
-double beta( a, b )
+double beta(a, b)
double a, b;
{
-double y;
-int sign;
+ double y;
+ int sign;
-sign = 1;
+ sign = 1;
-if( a <= 0.0 )
- {
- if( a == floor(a) )
- goto over;
- }
-if( b <= 0.0 )
- {
- if( b == floor(b) )
- goto over;
- }
+ if (a <= 0.0) {
+ if (a == floor(a))
+ goto over;
+ }
+ if (b <= 0.0) {
+ if (b == floor(b))
+ goto over;
+ }
-y = a + b;
-if( fabs(y) > MAXGAM )
- {
+ y = a + b;
+ if (fabs(y) > MAXGAM) {
y = lgam(y);
- sign *= sgngam; /* keep track of the sign */
+ sign *= sgngam; /* keep track of the sign */
y = lgam(b) - y;
sign *= sgngam;
y = lgam(a) + y;
sign *= sgngam;
- if( y > MAXLOG )
- {
-over:
- mtherr( "beta", OVERFLOW );
- return( sign * MAXNUM );
- }
- return( sign * exp(y) );
+ if (y > MAXLOG) {
+ over:
+ mtherr("beta", OVERFLOW);
+ return (sign * NPY_INFINITY);
}
+ return (sign * exp(y));
+ }
-y = Gamma(y);
-if( y == 0.0 )
+ y = Gamma(y);
+ if (y == 0.0)
goto over;
-if( a > b )
- {
- y = Gamma(a)/y;
+ if (a > b) {
+ y = Gamma(a) / y;
y *= Gamma(b);
- }
-else
- {
- y = Gamma(b)/y;
+ }
+ else {
+ y = Gamma(b) / y;
y *= Gamma(a);
- }
+ }
-return(y);
+ return (y);
}
/* Natural log of |beta|. Return the sign of beta in sgngam. */
-double lbeta( a, b )
+double lbeta(a, b)
double a, b;
{
-double y;
-int sign;
+ double y;
+ int sign;
-sign = 1;
+ sign = 1;
-if( a <= 0.0 )
- {
- if( a == floor(a) )
- goto over;
- }
-if( b <= 0.0 )
- {
- if( b == floor(b) )
- goto over;
- }
+ if (a <= 0.0) {
+ if (a == floor(a))
+ goto over;
+ }
+ if (b <= 0.0) {
+ if (b == floor(b))
+ goto over;
+ }
-y = a + b;
-if( fabs(y) > MAXGAM )
- {
+ y = a + b;
+ if (fabs(y) > MAXGAM) {
y = lgam(y);
- sign *= sgngam; /* keep track of the sign */
+ sign *= sgngam; /* keep track of the sign */
y = lgam(b) - y;
sign *= sgngam;
y = lgam(a) + y;
sign *= sgngam;
sgngam = sign;
- return( y );
- }
-
-y = Gamma(y);
-if( y == 0.0 )
- {
-over:
- mtherr( "lbeta", OVERFLOW );
- return( sign * MAXNUM );
- }
-
-if( a > b )
- {
- y = Gamma(a)/y;
+ return (y);
+ }
+
+ y = Gamma(y);
+ if (y == 0.0) {
+ over:
+ mtherr("lbeta", OVERFLOW);
+ return (sign * NPY_INFINITY);
+ }
+
+ if (a > b) {
+ y = Gamma(a) / y;
y *= Gamma(b);
- }
-else
- {
- y = Gamma(b)/y;
+ }
+ else {
+ y = Gamma(b) / y;
y *= Gamma(a);
- }
+ }
-if( y < 0 )
- {
- sgngam = -1;
- y = -y;
- }
-else
- sgngam = 1;
+ if (y < 0) {
+ sgngam = -1;
+ y = -y;
+ }
+ else
+ sgngam = 1;
-return( log(y) );
+ return (log(y));
}
View
16 scipy/special/cephes/btdtr.c
@@ -1,7 +1,7 @@
-/* btdtr.c
+/* btdtr.c
*
- * Beta distribution
+ * Beta distribution
*
*
*
@@ -42,19 +42,19 @@
*
*/
-/* btdtr() */
+/* btdtr() */
/*
-Cephes Math Library Release 2.0: April, 1987
-Copyright 1984, 1987, 1995 by Stephen L. Moshier
-*/
+ * Cephes Math Library Release 2.0: April, 1987
+ * Copyright 1984, 1987, 1995 by Stephen L. Moshier
+ */
#include "mconf.h"
-double btdtr( a, b, x )
+double btdtr(a, b, x)
double a, b, x;
{
-return( incbet( a, b, x ) );
+ return (incbet(a, b, x));
}
View
110 scipy/special/cephes/cbrt.c
@@ -1,6 +1,6 @@
-/* cbrt.c
+/* cbrt.c
*
- * Cube root
+ * Cube root
*
*
*
@@ -36,91 +36,87 @@
/* cbrt.c */
/*
-Cephes Math Library Release 2.2: January, 1991
-Copyright 1984, 1991 by Stephen L. Moshier
-Direct inquiries to 30 Frost Street, Cambridge, MA 02140
-*/
+ * Cephes Math Library Release 2.2: January, 1991
+ * Copyright 1984, 1991 by Stephen L. Moshier
+ * Direct inquiries to 30 Frost Street, Cambridge, MA 02140
+ */
#include "mconf.h"
-static double CBRT2 = 1.2599210498948731647672;
-static double CBRT4 = 1.5874010519681994747517;
+static double CBRT2 = 1.2599210498948731647672;
+static double CBRT4 = 1.5874010519681994747517;
static double CBRT2I = 0.79370052598409973737585;
static double CBRT4I = 0.62996052494743658238361;
double cbrt(double x)
{
-int e, rem, sign;
-double z;
+ int e, rem, sign;
+ double z;
-if( !npy_isfinite(x) )
- return x;
-if( x == 0 )
- return( x );
-if( x > 0 )
+ if (!npy_isfinite(x))
+ return x;
+ if (x == 0)
+ return (x);
+ if (x > 0)
sign = 1;
-else
- {
+ else {
sign = -1;
x = -x;
- }
+ }
-z = x;
-/* extract power of 2, leaving
- * mantissa between 0.5 and 1
- */
-x = frexp( x, &e );
+ z = x;
+ /* extract power of 2, leaving
+ * mantissa between 0.5 and 1
+ */
+ x = frexp(x, &e);
-/* Approximate cube root of number between .5 and 1,
- * peak relative error = 9.2e-6
- */
-x = (((-1.3466110473359520655053e-1 * x
- + 5.4664601366395524503440e-1) * x
- - 9.5438224771509446525043e-1) * x
- + 1.1399983354717293273738e0 ) * x
- + 4.0238979564544752126924e-1;
+ /* Approximate cube root of number between .5 and 1,
+ * peak relative error = 9.2e-6
+ */
+ x = (((-1.3466110473359520655053e-1 * x
+ + 5.4664601366395524503440e-1) * x
+ - 9.5438224771509446525043e-1) * x
+ + 1.1399983354717293273738e0) * x + 4.0238979564544752126924e-1;
-/* exponent divided by 3 */
-if( e >= 0 )
- {
+ /* exponent divided by 3 */
+ if (e >= 0) {
rem = e;
e /= 3;
- rem -= 3*e;
- if( rem == 1 )
- x *= CBRT2;
- else if( rem == 2 )
- x *= CBRT4;
- }
+ rem -= 3 * e;
+ if (rem == 1)
+ x *= CBRT2;
+ else if (rem == 2)
+ x *= CBRT4;
+ }
-/* argument less than 1 */
+ /* argument less than 1 */
-else
- {
+ else {
e = -e;
rem = e;
e /= 3;
- rem -= 3*e;
- if( rem == 1 )
- x *= CBRT2I;
- else if( rem == 2 )
- x *= CBRT4I;
+ rem -= 3 * e;
+ if (rem == 1)
+ x *= CBRT2I;
+ else if (rem == 2)
+ x *= CBRT4I;
e = -e;
- }
+ }
-/* multiply by power of 2 */
-x = ldexp( x, e );
+ /* multiply by power of 2 */
+ x = ldexp(x, e);
-/* Newton iteration */
-x -= ( x - (z/(x*x)) )*0.33333333333333333333;
+ /* Newton iteration */
+ x -= (x - (z / (x * x))) * 0.33333333333333333333;
#ifdef DEC
-x -= ( x - (z/(x*x)) )/3.0;
+ x -= (x - (z / (x * x))) / 3.0;
#else
-x -= ( x - (z/(x*x)) )*0.33333333333333333333;
+ x -= (x - (z / (x * x))) * 0.33333333333333333333;
#endif
-if( sign < 0 )
+ if (sign < 0)
x = -x;
-return(x);
+ return (x);
}
View
37 scipy/special/cephes/chbevl.c
@@ -1,6 +1,6 @@
-/* chbevl.c
+/* chbevl.c
*
- * Evaluate Chebyshev series
+ * Evaluate Chebyshev series
*
*
*
@@ -52,34 +52,33 @@
/* chbevl.c */
/*
-Cephes Math Library Release 2.0: April, 1987
-Copyright 1985, 1987 by Stephen L. Moshier
-Direct inquiries to 30 Frost Street, Cambridge, MA 02140
-*/
+ * Cephes Math Library Release 2.0: April, 1987
+ * Copyright 1985, 1987 by Stephen L. Moshier
+ * Direct inquiries to 30 Frost Street, Cambridge, MA 02140
+ */
#include <stdio.h>
#include "protos.h"
-double chbevl( x, array, n )
+double chbevl(x, array, n)
double x;
double array[];
int n;
{
-double b0, b1, b2, *p;
-int i;
+ double b0, b1, b2, *p;
+ int i;
-p = array;
-b0 = *p++;
-b1 = 0.0;
-i = n - 1;
+ p = array;
+ b0 = *p++;
+ b1 = 0.0;
+ i = n - 1;
-do
- {
+ do {
b2 = b1;
b1 = b0;
- b0 = x * b1 - b2 + *p++;
- }
-while( --i );
+ b0 = x * b1 - b2 + *p++;
+ }
+ while (--i);
-return( 0.5*(b0-b2) );
+ return (0.5 * (b0 - b2));
}
View
53 scipy/special/cephes/chdtr.c
@@ -1,6 +1,6 @@
-/* chdtr.c
+/* chdtr.c
*
- * Chi-square distribution
+ * Chi-square distribution
*
*
*
@@ -32,7 +32,7 @@
* The incomplete Gamma integral is used, according to the
* formula
*
- * y = chdtr( v, x ) = igam( v/2.0, x/2.0 ).
+ * y = chdtr( v, x ) = igam( v/2.0, x/2.0 ).
*
*
* The arguments must both be positive.
@@ -139,52 +139,51 @@
*
*/
-/* chdtr() */
+/* chdtr() */
/*
-Cephes Math Library Release 2.0: April, 1987
-Copyright 1984, 1987 by Stephen L. Moshier
-Direct inquiries to 30 Frost Street, Cambridge, MA 02140
-*/
+ * Cephes Math Library Release 2.0: April, 1987
+ * Copyright 1984, 1987 by Stephen L. Moshier
+ * Direct inquiries to 30 Frost Street, Cambridge, MA 02140
+ */
#include "mconf.h"
-double chdtrc(df,x)
+double chdtrc(df, x)
double df, x;
{
-if (x < 0.0) return 1.0; /* modified by T. Oliphant */
-return( igamc( df/2.0, x/2.0 ) );
+ if (x < 0.0)
+ return 1.0; /* modified by T. Oliphant */
+ return (igamc(df / 2.0, x / 2.0));
}
-double chdtr(df,x)
+double chdtr(df, x)
double df, x;
{
-if( (x < 0.0)) /* || (df < 1.0) ) */
- {
- mtherr( "chdtr", DOMAIN );
- return(NPY_NAN);
- }
-return( igam( df/2.0, x/2.0 ) );
+ if ((x < 0.0)) { /* || (df < 1.0) ) */
+ mtherr("chdtr", DOMAIN);
+ return (NPY_NAN);
+ }
+ return (igam(df / 2.0, x / 2.0));
}
-double chdtri( df, y )
+double chdtri(df, y)
double df, y;
{
-double x;
+ double x;
-if( (y < 0.0) || (y > 1.0)) /* || (df < 1.0) ) */
- {
- mtherr( "chdtri", DOMAIN );
- return(NPY_NAN);
- }
+ if ((y < 0.0) || (y > 1.0)) { /* || (df < 1.0) ) */
+ mtherr("chdtri", DOMAIN);
+ return (NPY_NAN);
+ }
-x = igami( 0.5 * df, y );
-return( 2.0 * x );
+ x = igami(0.5 * df, y);
+ return (2.0 * x);
}
View
179 scipy/special/cephes/const.c
@@ -1,6 +1,6 @@
-/* const.c
+/* const.c
*
- * Globally declared constants
+ * Globally declared constants
*
*
*
@@ -51,43 +51,46 @@
* These lists are subject to change.
*/