@danielsimonjr/mathts-functions 0.2.10 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +356 -275
- package/dist/typed/special.d.ts.map +1 -1
- package/package.json +73 -71
package/dist/index.js
CHANGED
|
@@ -5057,36 +5057,102 @@ function ellipticEDispatch(ms) {
|
|
|
5057
5057
|
}
|
|
5058
5058
|
return ellipticEJS(ms);
|
|
5059
5059
|
}
|
|
5060
|
+
var _SF_GAMMA = 0.5772156649015329;
|
|
5061
|
+
var _SF_2_PI = 0.6366197723675814;
|
|
5062
|
+
var _SF_1_PI = 0.3183098861837907;
|
|
5063
|
+
var _BESSEL_SERIES_MAX = 13;
|
|
5064
|
+
function _besselHankel(nu, x, wantY) {
|
|
5065
|
+
const mu = 4 * nu * nu;
|
|
5066
|
+
let P2 = 1;
|
|
5067
|
+
let Q2 = 0;
|
|
5068
|
+
let a = 1;
|
|
5069
|
+
let xk = 1;
|
|
5070
|
+
let prevMag = Infinity;
|
|
5071
|
+
for (let k = 1; k <= 40; k++) {
|
|
5072
|
+
const t1 = 2 * k - 1;
|
|
5073
|
+
a = a * (mu - t1 * t1) / (8 * k);
|
|
5074
|
+
xk *= x;
|
|
5075
|
+
const t = a / xk;
|
|
5076
|
+
if (Math.abs(t) > prevMag) break;
|
|
5077
|
+
prevMag = Math.abs(t);
|
|
5078
|
+
const m4 = k & 3;
|
|
5079
|
+
const s = m4 === 1 || m4 === 0 ? 1 : -1;
|
|
5080
|
+
if ((k & 1) === 1) Q2 += s * t;
|
|
5081
|
+
else P2 += s * t;
|
|
5082
|
+
}
|
|
5083
|
+
const chi = x - (nu * 0.5 + 0.25) * Math.PI;
|
|
5084
|
+
const amp = Math.sqrt(2 / (Math.PI * x));
|
|
5085
|
+
return wantY ? amp * (P2 * Math.sin(chi) + Q2 * Math.cos(chi)) : amp * (P2 * Math.cos(chi) - Q2 * Math.sin(chi));
|
|
5086
|
+
}
|
|
5087
|
+
function _besselJ0Series(x) {
|
|
5088
|
+
const z = -0.25 * x * x;
|
|
5089
|
+
let term = 1;
|
|
5090
|
+
let sum2 = 1;
|
|
5091
|
+
for (let k = 1; k <= 80; k++) {
|
|
5092
|
+
term *= z / (k * k);
|
|
5093
|
+
sum2 += term;
|
|
5094
|
+
if (Math.abs(term) <= Math.abs(sum2) * 1e-17) break;
|
|
5095
|
+
}
|
|
5096
|
+
return sum2;
|
|
5097
|
+
}
|
|
5098
|
+
function _besselJ1Series(x) {
|
|
5099
|
+
const z = -0.25 * x * x;
|
|
5100
|
+
let term = 1;
|
|
5101
|
+
let sum2 = 1;
|
|
5102
|
+
for (let k = 1; k <= 80; k++) {
|
|
5103
|
+
term *= z / (k * (k + 1));
|
|
5104
|
+
sum2 += term;
|
|
5105
|
+
if (Math.abs(term) <= Math.abs(sum2) * 1e-17) break;
|
|
5106
|
+
}
|
|
5107
|
+
return 0.5 * x * sum2;
|
|
5108
|
+
}
|
|
5109
|
+
function _besselY0Series(x) {
|
|
5110
|
+
const z = 0.25 * x * x;
|
|
5111
|
+
let u = 1;
|
|
5112
|
+
let h = 0;
|
|
5113
|
+
let s = 0;
|
|
5114
|
+
let sign3 = 1;
|
|
5115
|
+
for (let k = 1; k <= 80; k++) {
|
|
5116
|
+
u *= z / (k * k);
|
|
5117
|
+
h += 1 / k;
|
|
5118
|
+
s += sign3 * h * u;
|
|
5119
|
+
sign3 = -sign3;
|
|
5120
|
+
if (k > 2 && Math.abs(h * u) <= Math.abs(s) * 1e-17) break;
|
|
5121
|
+
}
|
|
5122
|
+
return _SF_2_PI * ((Math.log(0.5 * x) + _SF_GAMMA) * _besselJ0Series(x) + s);
|
|
5123
|
+
}
|
|
5124
|
+
function _besselY1Series(x) {
|
|
5125
|
+
const z = -0.25 * x * x;
|
|
5126
|
+
let v = 0.5 * x;
|
|
5127
|
+
let hk = 0;
|
|
5128
|
+
let hk1 = 1;
|
|
5129
|
+
let s = (hk + hk1) * v;
|
|
5130
|
+
for (let k = 1; k <= 80; k++) {
|
|
5131
|
+
v *= z / (k * (k + 1));
|
|
5132
|
+
hk += 1 / k;
|
|
5133
|
+
hk1 += 1 / (k + 1);
|
|
5134
|
+
s += (hk + hk1) * v;
|
|
5135
|
+
if (k > 2 && Math.abs((hk + hk1) * v) <= Math.abs(s) * 1e-17) break;
|
|
5136
|
+
}
|
|
5137
|
+
return _SF_2_PI * (Math.log(0.5 * x) + _SF_GAMMA) * _besselJ1Series(x) - _SF_2_PI / x - _SF_1_PI * s;
|
|
5138
|
+
}
|
|
5060
5139
|
function _besselJ0(x) {
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
const y2 = x * x;
|
|
5064
|
-
const a12 = 57568490574 + y2 * (-13362590354 + y2 * (6516196407e-1 + y2 * (-1121442418e-2 + y2 * (77392.33017 + y2 * -184.9052456))));
|
|
5065
|
-
const a22 = 57568490411 + y2 * (1029532985 + y2 * (9494680718e-3 + y2 * (59272.64853 + y2 * (267.8532712 + y2))));
|
|
5066
|
-
return a12 / a22;
|
|
5067
|
-
}
|
|
5068
|
-
const z = 8 / x;
|
|
5069
|
-
const y = z * z;
|
|
5070
|
-
const xx = x - 0.785398164;
|
|
5071
|
-
const a1 = 1 + y * (-0.001098628627 + y * (2734510407e-14 + y * (-2073370639e-15 + y * 2093887211e-16)));
|
|
5072
|
-
const a2 = -0.01562499995 + y * (1430488765e-13 + y * (-6911147651e-15 + y * (7621095161e-16 - y * 934935152e-16)));
|
|
5073
|
-
return Math.sqrt(0.636619772 / x) * (Math.cos(xx) * a1 - z * Math.sin(xx) * a2);
|
|
5140
|
+
const ax = Math.abs(x);
|
|
5141
|
+
return ax <= _BESSEL_SERIES_MAX ? _besselJ0Series(ax) : _besselHankel(0, ax, false);
|
|
5074
5142
|
}
|
|
5075
5143
|
function _besselJ1(x) {
|
|
5144
|
+
const ax = Math.abs(x);
|
|
5076
5145
|
const sign3 = x < 0 ? -1 : 1;
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
const a1 = 1 + y * (183105e-8 + y * (-3516396496e-14 + y * (2457520174e-15 - y * 2404127372e-16)));
|
|
5088
|
-
const a2 = 0.04687499995 + y * (-2002690873e-13 + y * (8449199096e-15 + y * (-8820898866e-16 + y * 1057874125e-16)));
|
|
5089
|
-
return sign3 * Math.sqrt(0.636619772 / x) * (Math.cos(xx) * a1 - z * Math.sin(xx) * a2);
|
|
5146
|
+
const val = ax <= _BESSEL_SERIES_MAX ? _besselJ1Series(ax) : _besselHankel(1, ax, false);
|
|
5147
|
+
return sign3 * val;
|
|
5148
|
+
}
|
|
5149
|
+
function _besselY0(x) {
|
|
5150
|
+
if (x <= 0) return NaN;
|
|
5151
|
+
return x <= _BESSEL_SERIES_MAX ? _besselY0Series(x) : _besselHankel(0, x, true);
|
|
5152
|
+
}
|
|
5153
|
+
function _besselY1(x) {
|
|
5154
|
+
if (x <= 0) return NaN;
|
|
5155
|
+
return x <= _BESSEL_SERIES_MAX ? _besselY1Series(x) : _besselHankel(1, x, true);
|
|
5090
5156
|
}
|
|
5091
5157
|
function _besselJn(n, x) {
|
|
5092
5158
|
const ni = Math.abs(Math.round(n));
|
|
@@ -5094,7 +5160,7 @@ function _besselJn(n, x) {
|
|
|
5094
5160
|
if (ni === 0) return sign3 * _besselJ0(x);
|
|
5095
5161
|
if (ni === 1) return sign3 * _besselJ1(x);
|
|
5096
5162
|
if (Math.abs(x) < 1e-15) return 0;
|
|
5097
|
-
if (
|
|
5163
|
+
if (Math.abs(x) > ni) {
|
|
5098
5164
|
let jPrev = _besselJ0(x);
|
|
5099
5165
|
let jCurr2 = _besselJ1(x);
|
|
5100
5166
|
for (let k = 1; k < ni; k++) {
|
|
@@ -5114,42 +5180,12 @@ function _besselJn(n, x) {
|
|
|
5114
5180
|
const jPrev = 2 * (k + 1) / x * jCurr - jNext;
|
|
5115
5181
|
jNext = jCurr;
|
|
5116
5182
|
jCurr = jPrev;
|
|
5117
|
-
if (k === ni) resultVal =
|
|
5183
|
+
if (k === ni) resultVal = jCurr;
|
|
5118
5184
|
if (k % 2 === 0) sum2 += jCurr;
|
|
5119
5185
|
}
|
|
5120
5186
|
sum2 = 2 * sum2 - jCurr;
|
|
5121
5187
|
return sign3 * (resultVal / sum2);
|
|
5122
5188
|
}
|
|
5123
|
-
function _besselY0(x) {
|
|
5124
|
-
if (x <= 0) return NaN;
|
|
5125
|
-
if (x < 8) {
|
|
5126
|
-
const y2 = x * x;
|
|
5127
|
-
const a12 = -2957821389 + y2 * (7062834065 + y2 * (-5123598036e-1 + y2 * (1087988129e-2 + y2 * (-86327.92757 + y2 * 228.4622733))));
|
|
5128
|
-
const a22 = 40076544269 + y2 * (7452499648e-1 + y2 * (7189466438e-3 + y2 * (47447.2647 + y2 * (226.1030244 + y2))));
|
|
5129
|
-
return a12 / a22 + 0.636619772 * _besselJ0(x) * Math.log(x);
|
|
5130
|
-
}
|
|
5131
|
-
const z = 8 / x;
|
|
5132
|
-
const y = z * z;
|
|
5133
|
-
const xx = x - 0.785398164;
|
|
5134
|
-
const a1 = 1 + y * (-0.001098628627 + y * (2734510407e-14 + y * (-2073370639e-15 + y * 2093887211e-16)));
|
|
5135
|
-
const a2 = -0.01562499995 + y * (1430488765e-13 + y * (-6911147651e-15 + y * (7621095161e-16 - y * 934935152e-16)));
|
|
5136
|
-
return Math.sqrt(0.636619772 / x) * (Math.sin(xx) * a1 + z * Math.cos(xx) * a2);
|
|
5137
|
-
}
|
|
5138
|
-
function _besselY1(x) {
|
|
5139
|
-
if (x <= 0) return NaN;
|
|
5140
|
-
if (x < 8) {
|
|
5141
|
-
const y2 = x * x;
|
|
5142
|
-
const a12 = x * (-4900604943e3 + y2 * (127527439e4 + y2 * (-51534381390 + y2 * (7349264551e-1 + y2 * (-4237922726e-3 + y2 * 8511.937935)))));
|
|
5143
|
-
const a22 = 2490985738e4 + y2 * (424441966400 + y2 * (3733650367 + y2 * (2245904002e-2 + y2 * (102042.605 + y2 * (354.9632885 + y2)))));
|
|
5144
|
-
return a12 / a22 + 0.636619772 * (_besselJ1(x) * Math.log(x) - 1 / x);
|
|
5145
|
-
}
|
|
5146
|
-
const z = 8 / x;
|
|
5147
|
-
const y = z * z;
|
|
5148
|
-
const xx = x - 2.356194491;
|
|
5149
|
-
const a1 = 1 + y * (183105e-8 + y * (-3516396496e-14 + y * (2457520174e-15 - y * 2404127372e-16)));
|
|
5150
|
-
const a2 = 0.04687499995 + y * (-2002690873e-13 + y * (8449199096e-15 + y * (-8820898866e-16 + y * 1057874125e-16)));
|
|
5151
|
-
return Math.sqrt(0.636619772 / x) * (Math.sin(xx) * a1 + z * Math.cos(xx) * a2);
|
|
5152
|
-
}
|
|
5153
5189
|
function _besselYn(n, x) {
|
|
5154
5190
|
if (x <= 0) return NaN;
|
|
5155
5191
|
const ni = Math.abs(Math.round(n));
|
|
@@ -5167,16 +5203,14 @@ function _besselYn(n, x) {
|
|
|
5167
5203
|
}
|
|
5168
5204
|
var _AI0 = 0.3550280538878172;
|
|
5169
5205
|
var _AI_PRIME0 = 0.2588194037928068;
|
|
5170
|
-
var _XBIG =
|
|
5171
|
-
var
|
|
5172
|
-
1
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
1519768071625 / 8918845788160
|
|
5179
|
-
];
|
|
5206
|
+
var _XBIG = 5;
|
|
5207
|
+
var _AIRY_U = (() => {
|
|
5208
|
+
const u = [1];
|
|
5209
|
+
for (let k = 1; k <= 12; k++) {
|
|
5210
|
+
u.push(u[k - 1] * ((6 * k - 5) * (6 * k - 3) * (6 * k - 1)) / ((2 * k - 1) * 216 * k));
|
|
5211
|
+
}
|
|
5212
|
+
return u;
|
|
5213
|
+
})();
|
|
5180
5214
|
function _airyAiSeries(x) {
|
|
5181
5215
|
const x3 = x * x * x;
|
|
5182
5216
|
let f = 1;
|
|
@@ -5187,7 +5221,7 @@ function _airyAiSeries(x) {
|
|
|
5187
5221
|
let factG = 1;
|
|
5188
5222
|
let prodF = 1;
|
|
5189
5223
|
let prodG = 1;
|
|
5190
|
-
for (let k = 1; k <=
|
|
5224
|
+
for (let k = 1; k <= 40; k++) {
|
|
5191
5225
|
factF *= (3 * k - 2) * (3 * k - 1) * (3 * k);
|
|
5192
5226
|
factG *= (3 * k - 1) * (3 * k) * (3 * k + 1);
|
|
5193
5227
|
prodF *= 3 * k - 2;
|
|
@@ -5202,41 +5236,6 @@ function _airyAiSeries(x) {
|
|
|
5202
5236
|
}
|
|
5203
5237
|
return _AI0 * f - _AI_PRIME0 * g;
|
|
5204
5238
|
}
|
|
5205
|
-
function _airyAiLargePos(x) {
|
|
5206
|
-
const xp = Math.pow(x, 0.25);
|
|
5207
|
-
const zeta2 = 2 / 3 * x * Math.sqrt(x);
|
|
5208
|
-
let p = 0;
|
|
5209
|
-
let zk = 1;
|
|
5210
|
-
let sign3 = 1;
|
|
5211
|
-
for (const ck of _AIRY_C) {
|
|
5212
|
-
p += sign3 * ck / zk;
|
|
5213
|
-
zk *= zeta2;
|
|
5214
|
-
sign3 = -sign3;
|
|
5215
|
-
}
|
|
5216
|
-
return Math.exp(-zeta2) * p / (2 * Math.sqrt(Math.PI) * xp);
|
|
5217
|
-
}
|
|
5218
|
-
function _airyAiLargeNeg(x) {
|
|
5219
|
-
const ax = Math.abs(x);
|
|
5220
|
-
const axp = Math.pow(ax, 0.25);
|
|
5221
|
-
const zeta2 = 2 / 3 * ax * Math.sqrt(ax);
|
|
5222
|
-
const theta = zeta2 - Math.PI / 4;
|
|
5223
|
-
let p = 0;
|
|
5224
|
-
let q = 0;
|
|
5225
|
-
let zk = 1;
|
|
5226
|
-
let sign3 = 1;
|
|
5227
|
-
for (let k = 0; k < _AIRY_C.length; k++) {
|
|
5228
|
-
if (k % 2 === 0) p += sign3 * _AIRY_C[k] / zk;
|
|
5229
|
-
else q += sign3 * _AIRY_C[k] / zk;
|
|
5230
|
-
zk *= zeta2;
|
|
5231
|
-
sign3 = -sign3;
|
|
5232
|
-
}
|
|
5233
|
-
return (Math.sin(theta) * p + Math.cos(theta) * q) / (Math.sqrt(Math.PI) * axp);
|
|
5234
|
-
}
|
|
5235
|
-
function _airyAi(x) {
|
|
5236
|
-
if (x > _XBIG) return _airyAiLargePos(x);
|
|
5237
|
-
if (x < -_XBIG) return _airyAiLargeNeg(x);
|
|
5238
|
-
return _airyAiSeries(x);
|
|
5239
|
-
}
|
|
5240
5239
|
function _airyBiSeries(x) {
|
|
5241
5240
|
const x3 = x * x * x;
|
|
5242
5241
|
let f = 1;
|
|
@@ -5247,7 +5246,7 @@ function _airyBiSeries(x) {
|
|
|
5247
5246
|
let factG = 1;
|
|
5248
5247
|
let prodF = 1;
|
|
5249
5248
|
let prodG = 1;
|
|
5250
|
-
for (let k = 1; k <=
|
|
5249
|
+
for (let k = 1; k <= 40; k++) {
|
|
5251
5250
|
factF *= (3 * k - 2) * (3 * k - 1) * (3 * k);
|
|
5252
5251
|
factG *= (3 * k - 1) * (3 * k) * (3 * k + 1);
|
|
5253
5252
|
prodF *= 3 * k - 2;
|
|
@@ -5262,63 +5261,90 @@ function _airyBiSeries(x) {
|
|
|
5262
5261
|
}
|
|
5263
5262
|
return Math.sqrt(3) * (_AI0 * f + _AI_PRIME0 * g);
|
|
5264
5263
|
}
|
|
5265
|
-
function
|
|
5264
|
+
function _airyAsymPos(x, isAi) {
|
|
5266
5265
|
const xp = Math.pow(x, 0.25);
|
|
5267
5266
|
const zeta2 = 2 / 3 * x * Math.sqrt(x);
|
|
5268
5267
|
let p = 0;
|
|
5269
5268
|
let zk = 1;
|
|
5270
|
-
|
|
5271
|
-
|
|
5269
|
+
let sign3 = 1;
|
|
5270
|
+
let prevMag = Infinity;
|
|
5271
|
+
for (const uk of _AIRY_U) {
|
|
5272
|
+
const t = uk / zk;
|
|
5273
|
+
if (Math.abs(t) > prevMag) break;
|
|
5274
|
+
prevMag = Math.abs(t);
|
|
5275
|
+
p += isAi ? sign3 * t : t;
|
|
5272
5276
|
zk *= zeta2;
|
|
5277
|
+
sign3 = -sign3;
|
|
5273
5278
|
}
|
|
5274
|
-
|
|
5279
|
+
const sp = Math.sqrt(Math.PI);
|
|
5280
|
+
return isAi ? Math.exp(-zeta2) * p / (2 * sp * xp) : Math.exp(zeta2) * p / (sp * xp);
|
|
5275
5281
|
}
|
|
5276
|
-
function
|
|
5282
|
+
function _airyAsymNeg(x, isAi) {
|
|
5277
5283
|
const ax = Math.abs(x);
|
|
5278
5284
|
const axp = Math.pow(ax, 0.25);
|
|
5279
5285
|
const zeta2 = 2 / 3 * ax * Math.sqrt(ax);
|
|
5280
|
-
|
|
5281
|
-
let
|
|
5282
|
-
let
|
|
5283
|
-
let
|
|
5284
|
-
|
|
5285
|
-
for (let k = 0; k
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5286
|
+
let P2 = 0;
|
|
5287
|
+
let Q2 = 0;
|
|
5288
|
+
let pTerm = Infinity;
|
|
5289
|
+
let qTerm = Infinity;
|
|
5290
|
+
const half = Math.floor((_AIRY_U.length - 1) / 2);
|
|
5291
|
+
for (let k = 0; k <= half; k++) {
|
|
5292
|
+
const t = (k % 2 === 0 ? 1 : -1) * _AIRY_U[2 * k] / Math.pow(zeta2, 2 * k);
|
|
5293
|
+
if (Math.abs(t) > Math.abs(pTerm)) break;
|
|
5294
|
+
P2 += t;
|
|
5295
|
+
pTerm = t;
|
|
5290
5296
|
}
|
|
5291
|
-
|
|
5297
|
+
for (let k = 0; k <= half - 1; k++) {
|
|
5298
|
+
const t = (k % 2 === 0 ? 1 : -1) * _AIRY_U[2 * k + 1] / Math.pow(zeta2, 2 * k + 1);
|
|
5299
|
+
if (Math.abs(t) > Math.abs(qTerm)) break;
|
|
5300
|
+
Q2 += t;
|
|
5301
|
+
qTerm = t;
|
|
5302
|
+
}
|
|
5303
|
+
const theta = zeta2 - Math.PI / 4;
|
|
5304
|
+
const sp = Math.sqrt(Math.PI);
|
|
5305
|
+
return isAi ? (Math.cos(theta) * P2 + Math.sin(theta) * Q2) / (sp * axp) : (-Math.sin(theta) * P2 + Math.cos(theta) * Q2) / (sp * axp);
|
|
5306
|
+
}
|
|
5307
|
+
function _airyAi(x) {
|
|
5308
|
+
if (x > _XBIG) return _airyAsymPos(x, true);
|
|
5309
|
+
if (x < -_XBIG) return _airyAsymNeg(x, true);
|
|
5310
|
+
return _airyAiSeries(x);
|
|
5292
5311
|
}
|
|
5293
5312
|
function _airyBi(x) {
|
|
5294
|
-
if (x > _XBIG) return
|
|
5295
|
-
if (x < -_XBIG) return
|
|
5313
|
+
if (x > _XBIG) return _airyAsymPos(x, false);
|
|
5314
|
+
if (x < -_XBIG) return _airyAsymNeg(x, false);
|
|
5296
5315
|
return _airyBiSeries(x);
|
|
5297
5316
|
}
|
|
5298
5317
|
|
|
5299
5318
|
// src/typed/special.ts
|
|
5300
|
-
function
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
const
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5319
|
+
function _erfSeries(a) {
|
|
5320
|
+
const c = 2 / Math.sqrt(Math.PI);
|
|
5321
|
+
let sum2 = a;
|
|
5322
|
+
let term = a;
|
|
5323
|
+
for (let n = 1; n < 80; n++) {
|
|
5324
|
+
term *= -a * a / n;
|
|
5325
|
+
const inc = term / (2 * n + 1);
|
|
5326
|
+
sum2 += inc;
|
|
5327
|
+
if (Math.abs(inc) < Math.abs(sum2) * 1e-17) break;
|
|
5328
|
+
}
|
|
5329
|
+
return c * sum2;
|
|
5330
|
+
}
|
|
5331
|
+
function _erfcCF(a) {
|
|
5332
|
+
const tiny = 1e-300;
|
|
5333
|
+
let f = a < tiny ? tiny : a;
|
|
5334
|
+
let C = f;
|
|
5335
|
+
let D = 0;
|
|
5336
|
+
for (let i = 1; i <= 300; i++) {
|
|
5337
|
+
const ai = i / 2;
|
|
5338
|
+
D = a + ai * D;
|
|
5339
|
+
if (D === 0) D = tiny;
|
|
5340
|
+
D = 1 / D;
|
|
5341
|
+
C = a + ai / C;
|
|
5342
|
+
if (C === 0) C = tiny;
|
|
5343
|
+
const delta = C * D;
|
|
5344
|
+
f *= delta;
|
|
5345
|
+
if (Math.abs(delta - 1) < 1e-16) break;
|
|
5346
|
+
}
|
|
5347
|
+
return Math.exp(-a * a) / Math.sqrt(Math.PI) / f;
|
|
5322
5348
|
}
|
|
5323
5349
|
function _lgamma2(x) {
|
|
5324
5350
|
if (x <= 0 && x === Math.floor(x)) return Infinity;
|
|
@@ -5352,7 +5378,9 @@ function factorial(n) {
|
|
|
5352
5378
|
return r;
|
|
5353
5379
|
}
|
|
5354
5380
|
function erfcScalar(x) {
|
|
5355
|
-
return
|
|
5381
|
+
if (!isFinite(x)) return x > 0 ? 0 : 2;
|
|
5382
|
+
if (x < 0) return 2 - erfcScalar(-x);
|
|
5383
|
+
return x < 1.5 ? 1 - _erfSeries(x) : _erfcCF(x);
|
|
5356
5384
|
}
|
|
5357
5385
|
function erfiScalar(x) {
|
|
5358
5386
|
const c = 2 / Math.sqrt(Math.PI);
|
|
@@ -5426,72 +5454,101 @@ function digammaScalar(x) {
|
|
|
5426
5454
|
}
|
|
5427
5455
|
return result;
|
|
5428
5456
|
}
|
|
5457
|
+
function besselHankel(nu, x, wantY) {
|
|
5458
|
+
const mu = 4 * nu * nu;
|
|
5459
|
+
let P2 = 1;
|
|
5460
|
+
let Q2 = 0;
|
|
5461
|
+
let a = 1;
|
|
5462
|
+
let xk = 1;
|
|
5463
|
+
let prevMag = Infinity;
|
|
5464
|
+
for (let k = 1; k <= 40; k++) {
|
|
5465
|
+
const twokm1 = 2 * k - 1;
|
|
5466
|
+
a = a * (mu - twokm1 * twokm1) / (8 * k);
|
|
5467
|
+
xk *= x;
|
|
5468
|
+
const t = a / xk;
|
|
5469
|
+
const mag = Math.abs(t);
|
|
5470
|
+
if (mag > prevMag) break;
|
|
5471
|
+
prevMag = mag;
|
|
5472
|
+
const m4 = k & 3;
|
|
5473
|
+
const s = m4 === 1 || m4 === 0 ? 1 : -1;
|
|
5474
|
+
if ((k & 1) === 1) Q2 += s * t;
|
|
5475
|
+
else P2 += s * t;
|
|
5476
|
+
}
|
|
5477
|
+
const chi = x - (nu * 0.5 + 0.25) * Math.PI;
|
|
5478
|
+
const amp = Math.sqrt(2 / (Math.PI * x));
|
|
5479
|
+
return wantY ? amp * (P2 * Math.sin(chi) + Q2 * Math.cos(chi)) : amp * (P2 * Math.cos(chi) - Q2 * Math.sin(chi));
|
|
5480
|
+
}
|
|
5481
|
+
function besselJ0Series(x) {
|
|
5482
|
+
const z = -0.25 * x * x;
|
|
5483
|
+
let term = 1;
|
|
5484
|
+
let sum2 = 1;
|
|
5485
|
+
for (let k = 1; k <= 80; k++) {
|
|
5486
|
+
term *= z / (k * k);
|
|
5487
|
+
sum2 += term;
|
|
5488
|
+
if (Math.abs(term) <= Math.abs(sum2) * 1e-17) break;
|
|
5489
|
+
}
|
|
5490
|
+
return sum2;
|
|
5491
|
+
}
|
|
5492
|
+
function besselJ1Series(x) {
|
|
5493
|
+
const z = -0.25 * x * x;
|
|
5494
|
+
let term = 1;
|
|
5495
|
+
let sum2 = 1;
|
|
5496
|
+
for (let k = 1; k <= 80; k++) {
|
|
5497
|
+
term *= z / (k * (k + 1));
|
|
5498
|
+
sum2 += term;
|
|
5499
|
+
if (Math.abs(term) <= Math.abs(sum2) * 1e-17) break;
|
|
5500
|
+
}
|
|
5501
|
+
return 0.5 * x * sum2;
|
|
5502
|
+
}
|
|
5503
|
+
function besselY0Series(x) {
|
|
5504
|
+
const z = 0.25 * x * x;
|
|
5505
|
+
let u = 1;
|
|
5506
|
+
let h = 0;
|
|
5507
|
+
let s = 0;
|
|
5508
|
+
let sign3 = 1;
|
|
5509
|
+
for (let k = 1; k <= 80; k++) {
|
|
5510
|
+
u *= z / (k * k);
|
|
5511
|
+
h += 1 / k;
|
|
5512
|
+
const d = sign3 * h * u;
|
|
5513
|
+
s += d;
|
|
5514
|
+
sign3 = -sign3;
|
|
5515
|
+
if (k > 2 && Math.abs(d) <= Math.abs(s) * 1e-17) break;
|
|
5516
|
+
}
|
|
5517
|
+
return 0.6366197723675814 * ((Math.log(0.5 * x) + 0.5772156649015329) * besselJ0Series(x) + s);
|
|
5518
|
+
}
|
|
5519
|
+
function besselY1Series(x) {
|
|
5520
|
+
const z = -0.25 * x * x;
|
|
5521
|
+
let v = 0.5 * x;
|
|
5522
|
+
let hk = 0;
|
|
5523
|
+
let hk1 = 1;
|
|
5524
|
+
let s = (hk + hk1) * v;
|
|
5525
|
+
for (let k = 1; k <= 80; k++) {
|
|
5526
|
+
v *= z / (k * (k + 1));
|
|
5527
|
+
hk += 1 / k;
|
|
5528
|
+
hk1 += 1 / (k + 1);
|
|
5529
|
+
const d = (hk + hk1) * v;
|
|
5530
|
+
s += d;
|
|
5531
|
+
if (k > 2 && Math.abs(d) <= Math.abs(s) * 1e-17) break;
|
|
5532
|
+
}
|
|
5533
|
+
return 0.6366197723675814 * (Math.log(0.5 * x) + 0.5772156649015329) * besselJ1Series(x) - 0.6366197723675814 / x - 0.3183098861837907 * s;
|
|
5534
|
+
}
|
|
5429
5535
|
function besselJ0Scalar(x) {
|
|
5430
|
-
if (x === 0) return 1;
|
|
5431
5536
|
const ax = Math.abs(x);
|
|
5432
|
-
|
|
5433
|
-
const y = x * x;
|
|
5434
|
-
const r1 = 57568490574 + y * (-13362590354 + y * (6516196407e-1 + y * (-1121442418e-2 + y * (77392.33017 + y * -184.9052456))));
|
|
5435
|
-
const r2 = 57568490411 + y * (1029532985 + y * (9494680718e-3 + y * (59272.64853 + y * (267.8532712 + y * 1))));
|
|
5436
|
-
return r1 / r2;
|
|
5437
|
-
} else {
|
|
5438
|
-
const z = 8 / ax;
|
|
5439
|
-
const y = z * z;
|
|
5440
|
-
const xx = ax - 0.785398164;
|
|
5441
|
-
const p0 = 1 + y * (-0.001098628627 + y * (2734510407e-14 + y * (-2073370639e-15 + y * 2093887211e-16)));
|
|
5442
|
-
const q0 = -0.01562499995 + y * (1430488765e-13 + y * (-6911147651e-15 + y * (7621095161e-16 - y * 934935152e-16)));
|
|
5443
|
-
return Math.sqrt(0.636619772 / ax) * (p0 * Math.cos(xx) - z * q0 * Math.sin(xx));
|
|
5444
|
-
}
|
|
5537
|
+
return ax <= 13 ? besselJ0Series(ax) : besselHankel(0, ax, false);
|
|
5445
5538
|
}
|
|
5446
5539
|
function besselJ1Scalar(x) {
|
|
5447
5540
|
const ax = Math.abs(x);
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
const r2 = 144725228442 + y * (2300535178 + y * (1858330474e-2 + y * (99447.43394 + y * (376.9991397 + y * 1))));
|
|
5452
|
-
return r1 / r2;
|
|
5453
|
-
} else {
|
|
5454
|
-
const z = 8 / ax;
|
|
5455
|
-
const y = z * z;
|
|
5456
|
-
const xx = ax - 2.356194491;
|
|
5457
|
-
const p1 = 1 + y * (183105e-8 + y * (-3516396496e-14 + y * (2457520174e-15 + y * -240337019e-15)));
|
|
5458
|
-
const q1 = 0.04687499995 + y * (-2002690873e-13 + y * (8449199096e-15 + y * (-88228987e-14 + y * 105787412e-15)));
|
|
5459
|
-
let ans = Math.sqrt(0.636619772 / ax) * (p1 * Math.cos(xx) - z * q1 * Math.sin(xx));
|
|
5460
|
-
if (x < 0) ans = -ans;
|
|
5461
|
-
return ans;
|
|
5462
|
-
}
|
|
5541
|
+
const sign3 = x < 0 ? -1 : 1;
|
|
5542
|
+
const val = ax <= 13 ? besselJ1Series(ax) : besselHankel(1, ax, false);
|
|
5543
|
+
return sign3 * val;
|
|
5463
5544
|
}
|
|
5464
5545
|
function besselY0Scalar(x) {
|
|
5465
5546
|
if (x <= 0) return NaN;
|
|
5466
|
-
|
|
5467
|
-
const y = x * x;
|
|
5468
|
-
const r1 = -2957821389 + y * (7062834065 + y * (-5123598036e-1 + y * (1087988129e-2 + y * (-86327.92757 + y * 228.4622733))));
|
|
5469
|
-
const r2 = 40076544269 + y * (7452499648e-1 + y * (7189466438e-3 + y * (47447.2647 + y * (226.1030244 + y * 1))));
|
|
5470
|
-
return r1 / r2 + 0.636619772 * besselJ0Scalar(x) * Math.log(x);
|
|
5471
|
-
} else {
|
|
5472
|
-
const z = 8 / x;
|
|
5473
|
-
const y = z * z;
|
|
5474
|
-
const xx = x - 0.785398164;
|
|
5475
|
-
const p0 = 1 + y * (-0.001098628627 + y * (2734510407e-14 + y * (-2073370639e-15 + y * 2093887211e-16)));
|
|
5476
|
-
const q0 = -0.01562499995 + y * (1430488765e-13 + y * (-6911147651e-15 + y * (7621095161e-16 - y * 934935152e-16)));
|
|
5477
|
-
return Math.sqrt(0.636619772 / x) * (p0 * Math.sin(xx) + z * q0 * Math.cos(xx));
|
|
5478
|
-
}
|
|
5547
|
+
return x <= 13 ? besselY0Series(x) : besselHankel(0, x, true);
|
|
5479
5548
|
}
|
|
5480
5549
|
function besselY1Scalar(x) {
|
|
5481
5550
|
if (x <= 0) return NaN;
|
|
5482
|
-
|
|
5483
|
-
const y = x * x;
|
|
5484
|
-
const r1 = x * (-4900604943e3 + y * (127527439e4 + y * (-51534381390 + y * (7349264551e-1 + y * (-4237922726e-3 + y * 8511.937935)))));
|
|
5485
|
-
const r2 = 249958057e5 + y * (424441966400 + y * (3733650367 + y * (2245904002e-2 + y * (102042.605 + y * (354.9632885 + y)))));
|
|
5486
|
-
return r1 / r2 + 0.636619772 * (besselJ1Scalar(x) * Math.log(x) - 1 / x);
|
|
5487
|
-
} else {
|
|
5488
|
-
const z = 8 / x;
|
|
5489
|
-
const y = z * z;
|
|
5490
|
-
const xx = x - 2.356194491;
|
|
5491
|
-
const p1 = 1 + y * (183105e-8 + y * (-3516396496e-14 + y * (2457520174e-15 + y * -240337019e-15)));
|
|
5492
|
-
const q1 = 0.04687499995 + y * (-2002690873e-13 + y * (8449199096e-15 + y * (-88228987e-14 + y * 105787412e-15)));
|
|
5493
|
-
return Math.sqrt(0.636619772 / x) * (p1 * Math.sin(xx) + z * q1 * Math.cos(xx));
|
|
5494
|
-
}
|
|
5551
|
+
return x <= 13 ? besselY1Series(x) : besselHankel(1, x, true);
|
|
5495
5552
|
}
|
|
5496
5553
|
function besselJScalar(n, x) {
|
|
5497
5554
|
const ni = Math.round(n);
|
|
@@ -5499,7 +5556,7 @@ function besselJScalar(n, x) {
|
|
|
5499
5556
|
if (ni === 0) return besselJ0Scalar(x);
|
|
5500
5557
|
if (ni === 1) return besselJ1Scalar(x);
|
|
5501
5558
|
if (Math.abs(x) < 1e-15) return 0;
|
|
5502
|
-
if (
|
|
5559
|
+
if (Math.abs(x) > ni) {
|
|
5503
5560
|
let jPrev = besselJ0Scalar(x);
|
|
5504
5561
|
let jCurr = besselJ1Scalar(x);
|
|
5505
5562
|
for (let k = 1; k < ni; k++) {
|
|
@@ -5518,7 +5575,7 @@ function besselJScalar(n, x) {
|
|
|
5518
5575
|
const jPrev = 2 * (k + 1) / x * jCurr - jNext;
|
|
5519
5576
|
jNext = jCurr;
|
|
5520
5577
|
jCurr = jPrev;
|
|
5521
|
-
if (k === ni) result =
|
|
5578
|
+
if (k === ni) result = jCurr;
|
|
5522
5579
|
if (k % 2 === 0) sum2 += jCurr;
|
|
5523
5580
|
}
|
|
5524
5581
|
sum2 = 2 * sum2 - jCurr;
|
|
@@ -5551,29 +5608,64 @@ function besselIScalar(n, x) {
|
|
|
5551
5608
|
}
|
|
5552
5609
|
return sum2;
|
|
5553
5610
|
}
|
|
5611
|
+
function besselKAsym(nu, x) {
|
|
5612
|
+
const mu = 4 * nu * nu;
|
|
5613
|
+
let a = 1;
|
|
5614
|
+
let xk = 1;
|
|
5615
|
+
let sum2 = 1;
|
|
5616
|
+
let prevMag = Infinity;
|
|
5617
|
+
for (let k = 1; k <= 40; k++) {
|
|
5618
|
+
const t1 = 2 * k - 1;
|
|
5619
|
+
a = a * (mu - t1 * t1) / (8 * k);
|
|
5620
|
+
xk *= x;
|
|
5621
|
+
const t = a / xk;
|
|
5622
|
+
if (Math.abs(t) > prevMag) break;
|
|
5623
|
+
prevMag = Math.abs(t);
|
|
5624
|
+
sum2 += t;
|
|
5625
|
+
}
|
|
5626
|
+
return Math.sqrt(Math.PI / (2 * x)) * Math.exp(-x) * sum2;
|
|
5627
|
+
}
|
|
5628
|
+
function besselK0Series(x) {
|
|
5629
|
+
const z = 0.25 * x * x;
|
|
5630
|
+
let t = 1;
|
|
5631
|
+
let I0 = 1;
|
|
5632
|
+
let h = 0;
|
|
5633
|
+
let s = 0;
|
|
5634
|
+
for (let k = 1; k <= 80; k++) {
|
|
5635
|
+
t *= z / (k * k);
|
|
5636
|
+
I0 += t;
|
|
5637
|
+
h += 1 / k;
|
|
5638
|
+
s += h * t;
|
|
5639
|
+
if (k > 2 && t <= I0 * 1e-18) break;
|
|
5640
|
+
}
|
|
5641
|
+
return -(Math.log(0.5 * x) + 0.5772156649015329) * I0 + s;
|
|
5642
|
+
}
|
|
5643
|
+
function besselK1Series(x) {
|
|
5644
|
+
const z = 0.25 * x * x;
|
|
5645
|
+
let w = 1;
|
|
5646
|
+
let S1 = 1;
|
|
5647
|
+
let hk = 0;
|
|
5648
|
+
let hk1 = 1;
|
|
5649
|
+
let S2 = (hk + hk1) * 1;
|
|
5650
|
+
for (let k = 1; k <= 80; k++) {
|
|
5651
|
+
w *= z / (k * (k + 1));
|
|
5652
|
+
S1 += w;
|
|
5653
|
+
hk += 1 / k;
|
|
5654
|
+
hk1 += 1 / (k + 1);
|
|
5655
|
+
S2 += (hk + hk1) * w;
|
|
5656
|
+
if (k > 2 && w <= S1 * 1e-18) break;
|
|
5657
|
+
}
|
|
5658
|
+
return 1 / x + 0.5 * x * (Math.log(0.5 * x) + 0.5772156649015329) * S1 - 0.25 * x * S2;
|
|
5659
|
+
}
|
|
5554
5660
|
function besselKScalar(n, x) {
|
|
5555
5661
|
const ni = Math.round(Math.abs(n));
|
|
5556
5662
|
if (x <= 0) return NaN;
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
return Math.exp(-x2) / Math.sqrt(x2) * (1.25331414 + y * (-0.07832358 + y * (0.02189568 + y * (-0.01062446 + y * (587872e-8 + y * (-25154e-7 + y * 53208e-8))))));
|
|
5564
|
-
}
|
|
5565
|
-
function k1(x2) {
|
|
5566
|
-
if (x2 <= 2) {
|
|
5567
|
-
const y2 = x2 * x2 / 4;
|
|
5568
|
-
return Math.log(x2 / 2) * besselIScalar(1, x2) + 1 / x2 * (1 + y2 * (0.15443144 + y2 * (-0.67278579 + y2 * (-0.18156897 + y2 * (-0.01919402 + y2 * (-110404e-8 + y2 * -4686e-8))))));
|
|
5569
|
-
}
|
|
5570
|
-
const y = 2 / x2;
|
|
5571
|
-
return Math.exp(-x2) / Math.sqrt(x2) * (1.25331414 + y * (0.23498619 + y * (-0.0365562 + y * (0.01504268 + y * (-780353e-8 + y * (325614e-8 + y * -68245e-8))))));
|
|
5572
|
-
}
|
|
5573
|
-
if (ni === 0) return k0(x);
|
|
5574
|
-
if (ni === 1) return k1(x);
|
|
5575
|
-
let kPrev = k0(x);
|
|
5576
|
-
let kCurr = k1(x);
|
|
5663
|
+
const k0 = x <= 9 ? besselK0Series(x) : besselKAsym(0, x);
|
|
5664
|
+
const k1 = x <= 9 ? besselK1Series(x) : besselKAsym(1, x);
|
|
5665
|
+
if (ni === 0) return k0;
|
|
5666
|
+
if (ni === 1) return k1;
|
|
5667
|
+
let kPrev = k0;
|
|
5668
|
+
let kCurr = k1;
|
|
5577
5669
|
for (let k = 1; k < ni; k++) {
|
|
5578
5670
|
const kNext = 2 * k / x * kCurr + kPrev;
|
|
5579
5671
|
kPrev = kCurr;
|
|
@@ -5839,27 +5931,28 @@ function fresnelCScalar(x) {
|
|
|
5839
5931
|
}
|
|
5840
5932
|
return sign3 * sum2;
|
|
5841
5933
|
}
|
|
5842
|
-
|
|
5934
|
+
function airyUCoeffs() {
|
|
5843
5935
|
const u = [1];
|
|
5844
|
-
for (let k = 1; k <=
|
|
5845
|
-
u.push(u[k - 1] * ((6 * k - 5) * (6 * k - 3) * (6 * k - 1)) / (216 * k));
|
|
5936
|
+
for (let k = 1; k <= 12; k++) {
|
|
5937
|
+
u.push(u[k - 1] * ((6 * k - 5) * (6 * k - 3) * (6 * k - 1)) / ((2 * k - 1) * 216 * k));
|
|
5846
5938
|
}
|
|
5847
5939
|
return u;
|
|
5848
|
-
}
|
|
5940
|
+
}
|
|
5849
5941
|
function airyAsymPQ(zeta2) {
|
|
5850
5942
|
let p = 0, q = 0;
|
|
5851
5943
|
let pTerm = Infinity, qTerm = Infinity;
|
|
5852
|
-
const
|
|
5944
|
+
const U = airyUCoeffs();
|
|
5945
|
+
const half = Math.floor((U.length - 1) / 2);
|
|
5853
5946
|
for (let k = 0; k <= half; k++) {
|
|
5854
5947
|
const sign3 = k % 2 === 0 ? 1 : -1;
|
|
5855
|
-
const pt = sign3 *
|
|
5948
|
+
const pt = sign3 * U[2 * k] / Math.pow(zeta2, 2 * k);
|
|
5856
5949
|
if (Math.abs(pt) > Math.abs(pTerm)) break;
|
|
5857
5950
|
p += pt;
|
|
5858
5951
|
pTerm = pt;
|
|
5859
5952
|
}
|
|
5860
5953
|
for (let k = 0; k <= half - 1; k++) {
|
|
5861
5954
|
const sign3 = k % 2 === 0 ? 1 : -1;
|
|
5862
|
-
const qt = sign3 *
|
|
5955
|
+
const qt = sign3 * U[2 * k + 1] / Math.pow(zeta2, 2 * k + 1);
|
|
5863
5956
|
if (Math.abs(qt) > Math.abs(qTerm)) break;
|
|
5864
5957
|
q += qt;
|
|
5865
5958
|
qTerm = qt;
|
|
@@ -5867,24 +5960,18 @@ function airyAsymPQ(zeta2) {
|
|
|
5867
5960
|
return { p, q };
|
|
5868
5961
|
}
|
|
5869
5962
|
function airyAiScalar(x) {
|
|
5870
|
-
const XBIG =
|
|
5963
|
+
const XBIG = 5;
|
|
5871
5964
|
const AI0 = 0.3550280538878172;
|
|
5872
5965
|
const AI_PRIME0 = 0.2588194037928068;
|
|
5873
|
-
const C = [
|
|
5874
|
-
1,
|
|
5875
|
-
5 / 72,
|
|
5876
|
-
385 / 10368,
|
|
5877
|
-
85085 / 2239488,
|
|
5878
|
-
37182145 / 644972544,
|
|
5879
|
-
576576001025e-2 / 61917364224,
|
|
5880
|
-
1519768071625 / 8918845788160
|
|
5881
|
-
];
|
|
5882
5966
|
if (x > XBIG) {
|
|
5883
5967
|
const xp = Math.pow(x, 0.25);
|
|
5884
5968
|
const zeta2 = 2 / 3 * x * Math.sqrt(x);
|
|
5885
|
-
let p = 0, zk = 1, sign3 = 1;
|
|
5886
|
-
for (const
|
|
5887
|
-
|
|
5969
|
+
let p = 0, zk = 1, sign3 = 1, prevMag = Infinity;
|
|
5970
|
+
for (const uk of airyUCoeffs()) {
|
|
5971
|
+
const t = uk / zk;
|
|
5972
|
+
if (Math.abs(t) > prevMag) break;
|
|
5973
|
+
prevMag = Math.abs(t);
|
|
5974
|
+
p += sign3 * t;
|
|
5888
5975
|
zk *= zeta2;
|
|
5889
5976
|
sign3 = -sign3;
|
|
5890
5977
|
}
|
|
@@ -5916,24 +6003,18 @@ function airyAiScalar(x) {
|
|
|
5916
6003
|
return AI0 * f - AI_PRIME0 * g;
|
|
5917
6004
|
}
|
|
5918
6005
|
function airyBiScalar(x) {
|
|
5919
|
-
const XBIG =
|
|
6006
|
+
const XBIG = 5;
|
|
5920
6007
|
const AI0 = 0.3550280538878172;
|
|
5921
6008
|
const AI_PRIME0 = 0.2588194037928068;
|
|
5922
|
-
const C = [
|
|
5923
|
-
1,
|
|
5924
|
-
5 / 72,
|
|
5925
|
-
385 / 10368,
|
|
5926
|
-
85085 / 2239488,
|
|
5927
|
-
37182145 / 644972544,
|
|
5928
|
-
576576001025e-2 / 61917364224,
|
|
5929
|
-
1519768071625 / 8918845788160
|
|
5930
|
-
];
|
|
5931
6009
|
if (x > XBIG) {
|
|
5932
6010
|
const xp = Math.pow(x, 0.25);
|
|
5933
6011
|
const zeta2 = 2 / 3 * x * Math.sqrt(x);
|
|
5934
|
-
let p = 0, zk = 1;
|
|
5935
|
-
for (const
|
|
5936
|
-
|
|
6012
|
+
let p = 0, zk = 1, prevMag = Infinity;
|
|
6013
|
+
for (const uk of airyUCoeffs()) {
|
|
6014
|
+
const t = uk / zk;
|
|
6015
|
+
if (Math.abs(t) > prevMag) break;
|
|
6016
|
+
prevMag = Math.abs(t);
|
|
6017
|
+
p += t;
|
|
5937
6018
|
zk *= zeta2;
|
|
5938
6019
|
}
|
|
5939
6020
|
return Math.exp(zeta2) * p / (Math.sqrt(Math.PI) * xp);
|
|
@@ -5994,7 +6075,7 @@ async function mapArray(x, scalar, buildKernel) {
|
|
|
5994
6075
|
}
|
|
5995
6076
|
var erfc = mathTyped9("erfc", {
|
|
5996
6077
|
number: erfcScalar,
|
|
5997
|
-
Float64Array: (x) => mapArray(x, erfcScalar, () => kernelSource([
|
|
6078
|
+
Float64Array: (x) => mapArray(x, erfcScalar, () => kernelSource([_erfSeries, _erfcCF, erfcScalar], "(x) => erfcScalar(x)"))
|
|
5998
6079
|
});
|
|
5999
6080
|
var erfi = mathTyped9("erfi", {
|
|
6000
6081
|
number: erfiScalar,
|
|
@@ -6054,7 +6135,7 @@ var besselJ0 = mathTyped9("besselJ0", {
|
|
|
6054
6135
|
return mapArray(
|
|
6055
6136
|
x,
|
|
6056
6137
|
besselJ0Scalar,
|
|
6057
|
-
() => kernelSource([besselJ0Scalar], "(x) => besselJ0Scalar(x)")
|
|
6138
|
+
() => kernelSource([besselHankel, besselJ0Series, besselJ0Scalar], "(x) => besselJ0Scalar(x)")
|
|
6058
6139
|
);
|
|
6059
6140
|
}
|
|
6060
6141
|
});
|
|
@@ -6067,7 +6148,7 @@ var besselJ1 = mathTyped9("besselJ1", {
|
|
|
6067
6148
|
return mapArray(
|
|
6068
6149
|
x,
|
|
6069
6150
|
besselJ1Scalar,
|
|
6070
|
-
() => kernelSource([besselJ1Scalar], "(x) => besselJ1Scalar(x)")
|
|
6151
|
+
() => kernelSource([besselHankel, besselJ1Series, besselJ1Scalar], "(x) => besselJ1Scalar(x)")
|
|
6071
6152
|
);
|
|
6072
6153
|
}
|
|
6073
6154
|
});
|
|
@@ -6080,7 +6161,7 @@ var besselY0 = mathTyped9("besselY0", {
|
|
|
6080
6161
|
return mapArray(
|
|
6081
6162
|
x,
|
|
6082
6163
|
besselY0Scalar,
|
|
6083
|
-
() => kernelSource([
|
|
6164
|
+
() => kernelSource([besselHankel, besselJ0Series, besselY0Series, besselY0Scalar], "(x) => besselY0Scalar(x)")
|
|
6084
6165
|
);
|
|
6085
6166
|
}
|
|
6086
6167
|
});
|
|
@@ -6093,7 +6174,7 @@ var besselY1 = mathTyped9("besselY1", {
|
|
|
6093
6174
|
return mapArray(
|
|
6094
6175
|
x,
|
|
6095
6176
|
besselY1Scalar,
|
|
6096
|
-
() => kernelSource([
|
|
6177
|
+
() => kernelSource([besselHankel, besselJ1Series, besselY1Series, besselY1Scalar], "(x) => besselY1Scalar(x)")
|
|
6097
6178
|
);
|
|
6098
6179
|
}
|
|
6099
6180
|
});
|
|
@@ -6107,7 +6188,7 @@ var besselJ = mathTyped9("besselJ", {
|
|
|
6107
6188
|
x,
|
|
6108
6189
|
(v) => besselJScalar(n, v),
|
|
6109
6190
|
() => kernelSource(
|
|
6110
|
-
[besselJ0Scalar, besselJ1Scalar, besselJScalar],
|
|
6191
|
+
[besselHankel, besselJ0Series, besselJ1Series, besselJ0Scalar, besselJ1Scalar, besselJScalar],
|
|
6111
6192
|
`(x) => besselJScalar(${n}, x)`
|
|
6112
6193
|
)
|
|
6113
6194
|
);
|
|
@@ -6123,7 +6204,7 @@ var besselY = mathTyped9("besselY", {
|
|
|
6123
6204
|
x,
|
|
6124
6205
|
(v) => besselYScalar(n, v),
|
|
6125
6206
|
() => kernelSource(
|
|
6126
|
-
[besselJ0Scalar, besselJ1Scalar, besselY0Scalar, besselY1Scalar, besselYScalar],
|
|
6207
|
+
[besselHankel, besselJ0Series, besselJ1Series, besselY0Series, besselY1Series, besselJ0Scalar, besselJ1Scalar, besselY0Scalar, besselY1Scalar, besselYScalar],
|
|
6127
6208
|
`(x) => besselYScalar(${n}, x)`
|
|
6128
6209
|
)
|
|
6129
6210
|
);
|
|
@@ -6143,7 +6224,7 @@ var besselK = mathTyped9("besselK", {
|
|
|
6143
6224
|
x,
|
|
6144
6225
|
(v) => besselKScalar(n, v),
|
|
6145
6226
|
() => kernelSource(
|
|
6146
|
-
[
|
|
6227
|
+
[besselKAsym, besselK0Series, besselK1Series, besselKScalar],
|
|
6147
6228
|
`(x) => besselKScalar(${n}, x)`
|
|
6148
6229
|
)
|
|
6149
6230
|
)
|
|
@@ -6257,7 +6338,7 @@ var airyAi = mathTyped9("airyAi", {
|
|
|
6257
6338
|
if (x.length >= WASM_SPECIAL_THRESHOLD) {
|
|
6258
6339
|
return Promise.resolve(airyAiDispatch(x));
|
|
6259
6340
|
}
|
|
6260
|
-
return mapArray(x, airyAiScalar, () => kernelSource([airyAiScalar], "(x) => airyAiScalar(x)"));
|
|
6341
|
+
return mapArray(x, airyAiScalar, () => kernelSource([airyUCoeffs, airyAsymPQ, airyAiScalar], "(x) => airyAiScalar(x)"));
|
|
6261
6342
|
}
|
|
6262
6343
|
});
|
|
6263
6344
|
var airyBi = mathTyped9("airyBi", {
|
|
@@ -6266,7 +6347,7 @@ var airyBi = mathTyped9("airyBi", {
|
|
|
6266
6347
|
if (x.length >= WASM_SPECIAL_THRESHOLD) {
|
|
6267
6348
|
return Promise.resolve(airyBiDispatch(x));
|
|
6268
6349
|
}
|
|
6269
|
-
return mapArray(x, airyBiScalar, () => kernelSource([airyBiScalar], "(x) => airyBiScalar(x)"));
|
|
6350
|
+
return mapArray(x, airyBiScalar, () => kernelSource([airyUCoeffs, airyAsymPQ, airyBiScalar], "(x) => airyBiScalar(x)"));
|
|
6270
6351
|
}
|
|
6271
6352
|
});
|
|
6272
6353
|
var carlsonRC = mathTyped9("carlsonRC", {
|
|
@@ -6388,7 +6469,7 @@ function _lgammaD(x) {
|
|
|
6388
6469
|
const t = xm1 + g + 0.5;
|
|
6389
6470
|
return 0.5 * Math.log(2 * Math.PI) + (xm1 + 0.5) * Math.log(t) - t + Math.log(a);
|
|
6390
6471
|
}
|
|
6391
|
-
function
|
|
6472
|
+
function _erf(x) {
|
|
6392
6473
|
if (x === 0) return 0;
|
|
6393
6474
|
const sign3 = x < 0 ? -1 : 1;
|
|
6394
6475
|
const a = Math.abs(x);
|
|
@@ -6419,7 +6500,7 @@ function normalPDFScalar(x, mu, sigma) {
|
|
|
6419
6500
|
}
|
|
6420
6501
|
function normalCDFScalar(x, mu, sigma) {
|
|
6421
6502
|
if (sigma <= 0) return NaN;
|
|
6422
|
-
return 0.5 * (1 +
|
|
6503
|
+
return 0.5 * (1 + _erf((x - mu) / (sigma * Math.SQRT2)));
|
|
6423
6504
|
}
|
|
6424
6505
|
function exponentialPDFScalar(x, lambda) {
|
|
6425
6506
|
if (lambda <= 0) return NaN;
|
|
@@ -6488,12 +6569,12 @@ var normalCDF = mathTyped10("normalCDF", {
|
|
|
6488
6569
|
Float64Array: (x) => mapArray2(
|
|
6489
6570
|
x,
|
|
6490
6571
|
(v) => normalCDFScalar(v, 0, 1),
|
|
6491
|
-
() => kernelSource2([
|
|
6572
|
+
() => kernelSource2([_erf, normalCDFScalar], "(x) => normalCDFScalar(x, 0, 1)")
|
|
6492
6573
|
),
|
|
6493
6574
|
"Float64Array, number, number": (x, mu, sigma) => mapArray2(
|
|
6494
6575
|
x,
|
|
6495
6576
|
(v) => normalCDFScalar(v, mu, sigma),
|
|
6496
|
-
() => kernelSource2([
|
|
6577
|
+
() => kernelSource2([_erf, normalCDFScalar], `(x) => normalCDFScalar(x, ${mu}, ${sigma})`)
|
|
6497
6578
|
)
|
|
6498
6579
|
});
|
|
6499
6580
|
var exponentialPDF = mathTyped10("exponentialPDF", {
|
|
@@ -11653,7 +11734,7 @@ async function eigenvectorCentrality(adj, opts) {
|
|
|
11653
11734
|
import { computePool as computePool10 } from "@danielsimonjr/mathts-parallel";
|
|
11654
11735
|
var DIST_WORKER_THRESHOLD = 1e5;
|
|
11655
11736
|
var SQRT_2PI = Math.sqrt(2 * Math.PI);
|
|
11656
|
-
function
|
|
11737
|
+
function _erf2(x) {
|
|
11657
11738
|
if (x === 0) return 0;
|
|
11658
11739
|
const sign3 = x < 0 ? -1 : 1;
|
|
11659
11740
|
const a = Math.abs(x);
|
|
@@ -11802,7 +11883,7 @@ function normalDist(mu = 0, sigma = 1) {
|
|
|
11802
11883
|
if (sigma <= 0) throw new Error("normalDist: sigma must be positive");
|
|
11803
11884
|
return {
|
|
11804
11885
|
pdf: (x) => Math.exp(-0.5 * ((x - mu) / sigma) ** 2) / (sigma * SQRT_2PI),
|
|
11805
|
-
cdf: (x) => 0.5 * (1 +
|
|
11886
|
+
cdf: (x) => 0.5 * (1 + _erf2((x - mu) / (sigma * Math.SQRT2))),
|
|
11806
11887
|
quantile: (p) => mu + sigma * Math.SQRT2 * _erfInv(2 * p - 1),
|
|
11807
11888
|
mean: mu,
|
|
11808
11889
|
variance: sigma * sigma,
|
|
@@ -12147,7 +12228,7 @@ function logNormalDist(mu = 0, sigma = 1) {
|
|
|
12147
12228
|
},
|
|
12148
12229
|
cdf: (x) => {
|
|
12149
12230
|
if (x <= 0) return 0;
|
|
12150
|
-
return 0.5 * (1 +
|
|
12231
|
+
return 0.5 * (1 + _erf2((Math.log(x) - mu) / (sigma * Math.SQRT2)));
|
|
12151
12232
|
},
|
|
12152
12233
|
quantile: (p) => {
|
|
12153
12234
|
if (p <= 0) return 0;
|
|
@@ -12370,7 +12451,7 @@ function _variance(arr, ddof = 1) {
|
|
|
12370
12451
|
for (let i = 0; i < arr.length; i++) sum2 += (arr[i] - m) ** 2;
|
|
12371
12452
|
return sum2 / (arr.length - ddof);
|
|
12372
12453
|
}
|
|
12373
|
-
function
|
|
12454
|
+
function _erf3(x) {
|
|
12374
12455
|
if (x === 0) return 0;
|
|
12375
12456
|
const sign3 = x < 0 ? -1 : 1;
|
|
12376
12457
|
const a = Math.abs(x);
|
|
@@ -12474,7 +12555,7 @@ function _tPValue(t, df) {
|
|
|
12474
12555
|
return ib;
|
|
12475
12556
|
}
|
|
12476
12557
|
function _normalCDF(x) {
|
|
12477
|
-
return 0.5 * (1 +
|
|
12558
|
+
return 0.5 * (1 + _erf3(x / Math.SQRT2));
|
|
12478
12559
|
}
|
|
12479
12560
|
function _chiSquaredPValue(x, df) {
|
|
12480
12561
|
return 1 - _gammainc2(df / 2, x / 2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"special.d.ts","sourceRoot":"","sources":["../../src/typed/special.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"special.d.ts","sourceRoot":"","sources":["../../src/typed/special.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,71 +1,73 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@danielsimonjr/mathts-functions",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Mathematical functions for MathTS - arithmetic, algebra, trigonometry, statistics, and more",
|
|
5
|
-
"author": "Daniel Simon Jr.",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"main": "./dist/index.js",
|
|
9
|
-
"module": "./dist/index.js",
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"import": "./dist/index.js",
|
|
14
|
-
"types": "./dist/index.d.ts"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"files": [
|
|
18
|
-
"dist",
|
|
19
|
-
"README.md"
|
|
20
|
-
],
|
|
21
|
-
"scripts": {
|
|
22
|
-
"build": "tsup src/index.ts --format esm --clean && tsc -p tsconfig.dts.json",
|
|
23
|
-
"dev": "tsup src/index.ts --format esm --dts --watch",
|
|
24
|
-
"test": "vitest run",
|
|
25
|
-
"test:
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"@danielsimonjr/mathts-
|
|
37
|
-
"@danielsimonjr/mathts-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@danielsimonjr/mathts-functions",
|
|
3
|
+
"version": "0.2.11",
|
|
4
|
+
"description": "Mathematical functions for MathTS - arithmetic, algebra, trigonometry, statistics, and more",
|
|
5
|
+
"author": "Daniel Simon Jr.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"module": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsup src/index.ts --format esm --clean && tsc -p tsconfig.dts.json",
|
|
23
|
+
"dev": "tsup src/index.ts --format esm --dts --watch",
|
|
24
|
+
"test": "vitest run",
|
|
25
|
+
"test:diff": "node tests/diff-special.test.mjs",
|
|
26
|
+
"golden:gen": "python -X utf8 tests/golden/gen_special_goldens.py",
|
|
27
|
+
"test:watch": "vitest",
|
|
28
|
+
"test:coverage": "vitest run --coverage",
|
|
29
|
+
"typecheck": "tsc --noEmit",
|
|
30
|
+
"lint": "eslint src --ext .ts",
|
|
31
|
+
"lint:fix": "eslint src --ext .ts --fix",
|
|
32
|
+
"clean": "rm -rf dist",
|
|
33
|
+
"build:prod": "tsup src/index.ts --format esm --clean --minify --treeshake"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@danielsimonjr/mathts-core": "^0.1.5",
|
|
37
|
+
"@danielsimonjr/mathts-expression": "^0.2.4",
|
|
38
|
+
"@danielsimonjr/mathts-matrix": "^0.1.6",
|
|
39
|
+
"@danielsimonjr/mathts-parallel": "^0.2.2",
|
|
40
|
+
"bignumber.js": "^9.1.2",
|
|
41
|
+
"complex.js": "^2.2.5",
|
|
42
|
+
"decimal.js": "^10.4.3",
|
|
43
|
+
"escape-latex": "^1.2.0",
|
|
44
|
+
"fraction.js": "^5.2.1",
|
|
45
|
+
"javascript-natural-sort": "^0.7.1",
|
|
46
|
+
"seedrandom": "^3.0.5",
|
|
47
|
+
"tiny-emitter": "^2.1.0",
|
|
48
|
+
"typed-function": "github:danielsimonjr/typed-function"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/node": "^25.5.2",
|
|
52
|
+
"tsup": "^8.0.0",
|
|
53
|
+
"typescript": "^5.3.0",
|
|
54
|
+
"vitest": "^4.1.5"
|
|
55
|
+
},
|
|
56
|
+
"publishConfig": {
|
|
57
|
+
"access": "public"
|
|
58
|
+
},
|
|
59
|
+
"repository": {
|
|
60
|
+
"type": "git",
|
|
61
|
+
"url": "https://github.com/danielsimonjr/mathts",
|
|
62
|
+
"directory": "functions"
|
|
63
|
+
},
|
|
64
|
+
"keywords": [
|
|
65
|
+
"math",
|
|
66
|
+
"typescript",
|
|
67
|
+
"functions",
|
|
68
|
+
"arithmetic",
|
|
69
|
+
"algebra",
|
|
70
|
+
"trigonometry",
|
|
71
|
+
"statistics"
|
|
72
|
+
]
|
|
73
|
+
}
|