@ac-kit/math-analysis 0.1.2 → 0.1.4
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/CHANGELOG.md +16 -0
- package/README.md +1 -1
- package/dist/beta.d.ts +1 -1
- package/dist/beta.js +1 -1
- package/dist/bisect.d.ts +1 -1
- package/dist/bisect.js +1 -1
- package/dist/continued-fraction-eval.d.ts +2 -2
- package/dist/continued-fraction-eval.js +1 -1
- package/dist/convergence-error.d.ts +1 -1
- package/dist/convergence-error.js +1 -1
- package/dist/convergence-options.d.ts +1 -1
- package/dist/convergence-result.d.ts +1 -1
- package/dist/erf.d.ts +1 -1
- package/dist/erf.js +1 -1
- package/dist/erfc.d.ts +1 -1
- package/dist/erfc.js +1 -1
- package/dist/gamma.d.ts +1 -1
- package/dist/gamma.js +1 -1
- package/dist/inverse-regularized-incomplete-beta.d.ts +1 -1
- package/dist/inverse-regularized-incomplete-beta.js +1 -1
- package/dist/inverse-regularized-incomplete-gamma.d.ts +1 -1
- package/dist/inverse-regularized-incomplete-gamma.js +1 -1
- package/dist/log-beta.d.ts +1 -1
- package/dist/log-beta.js +1 -1
- package/dist/log-gamma.d.ts +1 -1
- package/dist/log-gamma.js +1 -1
- package/dist/regularized-incomplete-beta.d.ts +1 -1
- package/dist/regularized-incomplete-beta.js +1 -1
- package/dist/regularized-incomplete-gamma-upper.d.ts +1 -1
- package/dist/regularized-incomplete-gamma-upper.js +1 -1
- package/dist/regularized-incomplete-gamma.d.ts +1 -1
- package/dist/regularized-incomplete-gamma.js +1 -1
- package/dist/trapezoidal-rule.d.ts +1 -1
- package/dist/trapezoidal-rule.js +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @ac-kit/math-analysis
|
|
2
2
|
|
|
3
|
+
## 0.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [235ec3c]
|
|
8
|
+
- @ac-kit/core@0.5.0
|
|
9
|
+
- @ac-kit/math-scalar@0.1.4
|
|
10
|
+
|
|
11
|
+
## 0.1.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [aca1cb1]
|
|
16
|
+
- @ac-kit/core@0.4.0
|
|
17
|
+
- @ac-kit/math-scalar@0.1.3
|
|
18
|
+
|
|
3
19
|
## 0.1.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -64,5 +64,5 @@ trapezoidalRule(Math.sin, 0, Math.PI); // ≈ 2
|
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
See the
|
|
67
|
-
[generated API docs](https://anthochamp.
|
|
67
|
+
[generated API docs](https://anthochamp.pages.grenadine.io/node-essentials/api/math-analysis/)
|
|
68
68
|
for the full reference.
|
package/dist/beta.d.ts
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* @returns `B(a, b)`, or `NaN` when either parameter is non-positive, where the
|
|
31
31
|
* defining ratio has no real value.
|
|
32
32
|
* @see {@link logBeta} for shapes whose `B` underflows.
|
|
33
|
-
* @see [The gamma and beta functions](https://anthochamp.
|
|
33
|
+
* @see [The gamma and beta functions](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/gamma/)
|
|
34
34
|
*/
|
|
35
35
|
export declare function beta(a: number, b: number): number;
|
|
36
36
|
//# sourceMappingURL=beta.d.ts.map
|
package/dist/beta.js
CHANGED
|
@@ -61,7 +61,7 @@ function betaLanczos_(a, b) {
|
|
|
61
61
|
* @returns `B(a, b)`, or `NaN` when either parameter is non-positive, where the
|
|
62
62
|
* defining ratio has no real value.
|
|
63
63
|
* @see {@link logBeta} for shapes whose `B` underflows.
|
|
64
|
-
* @see [The gamma and beta functions](https://anthochamp.
|
|
64
|
+
* @see [The gamma and beta functions](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/gamma/)
|
|
65
65
|
*/
|
|
66
66
|
export function beta(a, b) {
|
|
67
67
|
if (!(a > 0) || !(b > 0)) {
|
package/dist/bisect.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ import type { ConvergenceOptions } from "./convergence-options.js";
|
|
|
34
34
|
* @returns An approximation of the root.
|
|
35
35
|
* @throws {RangeError} When `f(lower)` and `f(upper)` have the same sign, so
|
|
36
36
|
* nothing guarantees a root between them.
|
|
37
|
-
* @see [Root finding](https://anthochamp.
|
|
37
|
+
* @see [Root finding](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/calculus/root-finding/)
|
|
38
38
|
*/
|
|
39
39
|
export declare function bisect(f: (x: number) => number, lower: number, upper: number, options?: ConvergenceOptions): number;
|
|
40
40
|
//# sourceMappingURL=bisect.d.ts.map
|
package/dist/bisect.js
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
* @returns An approximation of the root.
|
|
34
34
|
* @throws {RangeError} When `f(lower)` and `f(upper)` have the same sign, so
|
|
35
35
|
* nothing guarantees a root between them.
|
|
36
|
-
* @see [Root finding](https://anthochamp.
|
|
36
|
+
* @see [Root finding](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/calculus/root-finding/)
|
|
37
37
|
*/
|
|
38
38
|
export function bisect(f, lower, upper, options) {
|
|
39
39
|
const tolerance = options?.tolerance ?? 1e-12;
|
|
@@ -13,7 +13,7 @@ import type { ConvergenceResult } from "./convergence-result.js";
|
|
|
13
13
|
* };
|
|
14
14
|
* ```;
|
|
15
15
|
*
|
|
16
|
-
* @see [Continued fractions](https://anthochamp.
|
|
16
|
+
* @see [Continued fractions](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/calculus/series/)
|
|
17
17
|
*/
|
|
18
18
|
export type ContinuedFraction = {
|
|
19
19
|
/** The partial numerator `aⱼ`, called with `index ≥ 1`. */
|
|
@@ -62,7 +62,7 @@ export type ContinuedFraction = {
|
|
|
62
62
|
* defaults to `Number.EPSILON` and `maxIterations` to 300.
|
|
63
63
|
* @returns The fraction's value, the iteration count, and whether the tolerance
|
|
64
64
|
* was met.
|
|
65
|
-
* @see [Continued fractions](https://anthochamp.
|
|
65
|
+
* @see [Continued fractions](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/calculus/series/)
|
|
66
66
|
*/
|
|
67
67
|
export declare function continuedFractionEval(fraction: ContinuedFraction, options?: ConvergenceOptions): ConvergenceResult<number>;
|
|
68
68
|
//# sourceMappingURL=continued-fraction-eval.d.ts.map
|
|
@@ -44,7 +44,7 @@ const TINY_ = 2 ** -1022 / Number.EPSILON;
|
|
|
44
44
|
* defaults to `Number.EPSILON` and `maxIterations` to 300.
|
|
45
45
|
* @returns The fraction's value, the iteration count, and whether the tolerance
|
|
46
46
|
* was met.
|
|
47
|
-
* @see [Continued fractions](https://anthochamp.
|
|
47
|
+
* @see [Continued fractions](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/calculus/series/)
|
|
48
48
|
*/
|
|
49
49
|
export function continuedFractionEval(fraction, options) {
|
|
50
50
|
// The modified Lentz algorithm, which works forwards from `b₀`. The backward
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* // ConvergenceError: regularizedIncompleteGamma: no convergence after 2 iterations
|
|
16
16
|
* ```;
|
|
17
17
|
*
|
|
18
|
-
* @see [Convergence and iteration limits](https://anthochamp.
|
|
18
|
+
* @see [Convergence and iteration limits](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/calculus/convergence/)
|
|
19
19
|
*/
|
|
20
20
|
export declare class ConvergenceError extends Error {
|
|
21
21
|
/** Name of the routine that gave up, so the message names a call site. */
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* // ConvergenceError: regularizedIncompleteGamma: no convergence after 2 iterations
|
|
16
16
|
* ```;
|
|
17
17
|
*
|
|
18
|
-
* @see [Convergence and iteration limits](https://anthochamp.
|
|
18
|
+
* @see [Convergence and iteration limits](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/calculus/convergence/)
|
|
19
19
|
*/
|
|
20
20
|
export class ConvergenceError extends Error {
|
|
21
21
|
routine;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* bisect(f, 0, 2, { tolerance: 1e-6, maxIterations: 50 });
|
|
17
17
|
* ```;
|
|
18
18
|
*
|
|
19
|
-
* @see [Convergence and iteration limits](https://anthochamp.
|
|
19
|
+
* @see [Convergence and iteration limits](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/calculus/convergence/)
|
|
20
20
|
*/
|
|
21
21
|
export type ConvergenceOptions = {
|
|
22
22
|
/**
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* }
|
|
18
18
|
* ```;
|
|
19
19
|
*
|
|
20
|
-
* @see [Convergence and iteration limits](https://anthochamp.
|
|
20
|
+
* @see [Convergence and iteration limits](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/calculus/convergence/)
|
|
21
21
|
*/
|
|
22
22
|
export type ConvergenceResult<T> = {
|
|
23
23
|
/** Best estimate available when the iteration stopped. */
|
package/dist/erf.d.ts
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* @param x Any real.
|
|
23
23
|
* @returns `erf(x)`, in `[−1, 1]`.
|
|
24
24
|
* @see {@link erfc} for the complement, and for tail probabilities.
|
|
25
|
-
* @see [The error function](https://anthochamp.
|
|
25
|
+
* @see [The error function](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/error-functions/)
|
|
26
26
|
*/
|
|
27
27
|
export declare function erf(x: number): number;
|
|
28
28
|
//# sourceMappingURL=erf.d.ts.map
|
package/dist/erf.js
CHANGED
|
@@ -23,7 +23,7 @@ import { regularizedIncompleteGamma } from "./regularized-incomplete-gamma.js";
|
|
|
23
23
|
* @param x Any real.
|
|
24
24
|
* @returns `erf(x)`, in `[−1, 1]`.
|
|
25
25
|
* @see {@link erfc} for the complement, and for tail probabilities.
|
|
26
|
-
* @see [The error function](https://anthochamp.
|
|
26
|
+
* @see [The error function](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/error-functions/)
|
|
27
27
|
*/
|
|
28
28
|
export function erf(x) {
|
|
29
29
|
if (Number.isNaN(x)) {
|
package/dist/erfc.d.ts
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* @param x Any real.
|
|
26
26
|
* @returns `erfc(x)`, in `[0, 2]`.
|
|
27
27
|
* @see {@link erf} when the answer is near 0 rather than near 1.
|
|
28
|
-
* @see [The error function](https://anthochamp.
|
|
28
|
+
* @see [The error function](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/error-functions/)
|
|
29
29
|
*/
|
|
30
30
|
export declare function erfc(x: number): number;
|
|
31
31
|
//# sourceMappingURL=erfc.d.ts.map
|
package/dist/erfc.js
CHANGED
|
@@ -27,7 +27,7 @@ import { regularizedIncompleteGamma } from "./regularized-incomplete-gamma.js";
|
|
|
27
27
|
* @param x Any real.
|
|
28
28
|
* @returns `erfc(x)`, in `[0, 2]`.
|
|
29
29
|
* @see {@link erf} when the answer is near 0 rather than near 1.
|
|
30
|
-
* @see [The error function](https://anthochamp.
|
|
30
|
+
* @see [The error function](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/error-functions/)
|
|
31
31
|
*/
|
|
32
32
|
export function erfc(x) {
|
|
33
33
|
if (Number.isNaN(x)) {
|
package/dist/gamma.d.ts
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* at the non-positive integers, where Γ has a pole whose one-sided limits
|
|
31
31
|
* disagree in sign.
|
|
32
32
|
* @see {@link logGamma} for arguments whose Γ overflows.
|
|
33
|
-
* @see [The gamma and beta functions](https://anthochamp.
|
|
33
|
+
* @see [The gamma and beta functions](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/gamma/)
|
|
34
34
|
*/
|
|
35
35
|
export declare function gamma(x: number): number;
|
|
36
36
|
//# sourceMappingURL=gamma.d.ts.map
|
package/dist/gamma.js
CHANGED
|
@@ -32,7 +32,7 @@ import { LANCZOS_G_, lanczosSeries_ } from "./_lanczos.js";
|
|
|
32
32
|
* at the non-positive integers, where Γ has a pole whose one-sided limits
|
|
33
33
|
* disagree in sign.
|
|
34
34
|
* @see {@link logGamma} for arguments whose Γ overflows.
|
|
35
|
-
* @see [The gamma and beta functions](https://anthochamp.
|
|
35
|
+
* @see [The gamma and beta functions](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/gamma/)
|
|
36
36
|
*/
|
|
37
37
|
export function gamma(x) {
|
|
38
38
|
if (x < 0.5) {
|
|
@@ -28,7 +28,7 @@ import type { ConvergenceOptions } from "./convergence-options.js";
|
|
|
28
28
|
* @returns The `x` with `Iₓ(a, b) = p`; `0` at `p = 0` and `1` at `p = 1`.
|
|
29
29
|
* @throws {RangeError} When `a ≤ 0`, `b ≤ 0`, or `p` is outside `[0, 1]`.
|
|
30
30
|
* @see {@link regularizedIncompleteBeta} for the forward direction.
|
|
31
|
-
* @see [Incomplete gamma and beta](https://anthochamp.
|
|
31
|
+
* @see [Incomplete gamma and beta](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/incomplete-gamma-beta/)
|
|
32
32
|
*/
|
|
33
33
|
export declare function inverseRegularizedIncompleteBeta(a: number, b: number, p: number, options?: ConvergenceOptions): number;
|
|
34
34
|
//# sourceMappingURL=inverse-regularized-incomplete-beta.d.ts.map
|
|
@@ -61,7 +61,7 @@ function initialGuess_(a, b, p) {
|
|
|
61
61
|
* @returns The `x` with `Iₓ(a, b) = p`; `0` at `p = 0` and `1` at `p = 1`.
|
|
62
62
|
* @throws {RangeError} When `a ≤ 0`, `b ≤ 0`, or `p` is outside `[0, 1]`.
|
|
63
63
|
* @see {@link regularizedIncompleteBeta} for the forward direction.
|
|
64
|
-
* @see [Incomplete gamma and beta](https://anthochamp.
|
|
64
|
+
* @see [Incomplete gamma and beta](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/incomplete-gamma-beta/)
|
|
65
65
|
*/
|
|
66
66
|
export function inverseRegularizedIncompleteBeta(a, b, p, options) {
|
|
67
67
|
// Halley's method, for the same reason as the gamma inverse: the curvature
|
|
@@ -30,7 +30,7 @@ import type { ConvergenceOptions } from "./convergence-options.js";
|
|
|
30
30
|
* 1`.
|
|
31
31
|
* @throws {RangeError} When `a ≤ 0` or `p` is outside `[0, 1]`.
|
|
32
32
|
* @see {@link regularizedIncompleteGamma} for the forward direction.
|
|
33
|
-
* @see [Incomplete gamma and beta](https://anthochamp.
|
|
33
|
+
* @see [Incomplete gamma and beta](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/incomplete-gamma-beta/)
|
|
34
34
|
*/
|
|
35
35
|
export declare function inverseRegularizedIncompleteGamma(a: number, p: number, options?: ConvergenceOptions): number;
|
|
36
36
|
//# sourceMappingURL=inverse-regularized-incomplete-gamma.d.ts.map
|
|
@@ -65,7 +65,7 @@ function initialGuess_(a, p) {
|
|
|
65
65
|
* 1`.
|
|
66
66
|
* @throws {RangeError} When `a ≤ 0` or `p` is outside `[0, 1]`.
|
|
67
67
|
* @see {@link regularizedIncompleteGamma} for the forward direction.
|
|
68
|
-
* @see [Incomplete gamma and beta](https://anthochamp.
|
|
68
|
+
* @see [Incomplete gamma and beta](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/incomplete-gamma-beta/)
|
|
69
69
|
*/
|
|
70
70
|
export function inverseRegularizedIncompleteGamma(a, p, options) {
|
|
71
71
|
// Halley's method rather than Newton's: the second-derivative term is one
|
package/dist/log-beta.d.ts
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* @param b Second shape parameter, positive.
|
|
24
24
|
* @returns `ln B(a, b)`, or `NaN` when either parameter is non-positive.
|
|
25
25
|
* @see {@link beta} for the value itself.
|
|
26
|
-
* @see [The gamma and beta functions](https://anthochamp.
|
|
26
|
+
* @see [The gamma and beta functions](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/gamma/)
|
|
27
27
|
*/
|
|
28
28
|
export declare function logBeta(a: number, b: number): number;
|
|
29
29
|
//# sourceMappingURL=log-beta.d.ts.map
|
package/dist/log-beta.js
CHANGED
|
@@ -25,7 +25,7 @@ import { logGamma } from "./log-gamma.js";
|
|
|
25
25
|
* @param b Second shape parameter, positive.
|
|
26
26
|
* @returns `ln B(a, b)`, or `NaN` when either parameter is non-positive.
|
|
27
27
|
* @see {@link beta} for the value itself.
|
|
28
|
-
* @see [The gamma and beta functions](https://anthochamp.
|
|
28
|
+
* @see [The gamma and beta functions](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/gamma/)
|
|
29
29
|
*/
|
|
30
30
|
export function logBeta(a, b) {
|
|
31
31
|
const value = beta(a, b);
|
package/dist/log-gamma.d.ts
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* @param x A positive real.
|
|
24
24
|
* @returns `ln Γ(x)`, or `NaN` when `x ≤ 0` or `x` is `NaN`.
|
|
25
25
|
* @see {@link gamma} for the value itself, and for negative arguments.
|
|
26
|
-
* @see [The gamma and beta functions](https://anthochamp.
|
|
26
|
+
* @see [The gamma and beta functions](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/gamma/)
|
|
27
27
|
*/
|
|
28
28
|
export declare function logGamma(x: number): number;
|
|
29
29
|
//# sourceMappingURL=log-gamma.d.ts.map
|
package/dist/log-gamma.js
CHANGED
|
@@ -25,7 +25,7 @@ import { LANCZOS_G_, lanczosSeries_ } from "./_lanczos.js";
|
|
|
25
25
|
* @param x A positive real.
|
|
26
26
|
* @returns `ln Γ(x)`, or `NaN` when `x ≤ 0` or `x` is `NaN`.
|
|
27
27
|
* @see {@link gamma} for the value itself, and for negative arguments.
|
|
28
|
-
* @see [The gamma and beta functions](https://anthochamp.
|
|
28
|
+
* @see [The gamma and beta functions](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/gamma/)
|
|
29
29
|
*/
|
|
30
30
|
export function logGamma(x) {
|
|
31
31
|
// Written as a positive test so NaN falls through to NaN rather than passing.
|
|
@@ -35,7 +35,7 @@ import type { ConvergenceOptions } from "./convergence-options.js";
|
|
|
35
35
|
* @throws {RangeError} When `a ≤ 0`, `b ≤ 0`, or `x` is outside `[0, 1]`.
|
|
36
36
|
* @throws {ConvergenceError} When the continued fraction met no tolerance.
|
|
37
37
|
* @see {@link inverseRegularizedIncompleteBeta} to go the other way.
|
|
38
|
-
* @see [Incomplete gamma and beta](https://anthochamp.
|
|
38
|
+
* @see [Incomplete gamma and beta](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/incomplete-gamma-beta/)
|
|
39
39
|
*/
|
|
40
40
|
export declare function regularizedIncompleteBeta(a: number, b: number, x: number, options?: ConvergenceOptions): number;
|
|
41
41
|
//# sourceMappingURL=regularized-incomplete-beta.d.ts.map
|
|
@@ -37,7 +37,7 @@ import { ConvergenceError } from "./convergence-error.js";
|
|
|
37
37
|
* @throws {RangeError} When `a ≤ 0`, `b ≤ 0`, or `x` is outside `[0, 1]`.
|
|
38
38
|
* @throws {ConvergenceError} When the continued fraction met no tolerance.
|
|
39
39
|
* @see {@link inverseRegularizedIncompleteBeta} to go the other way.
|
|
40
|
-
* @see [Incomplete gamma and beta](https://anthochamp.
|
|
40
|
+
* @see [Incomplete gamma and beta](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/incomplete-gamma-beta/)
|
|
41
41
|
*/
|
|
42
42
|
export function regularizedIncompleteBeta(a, b, x, options) {
|
|
43
43
|
assertBetaShape_("regularizedIncompleteBeta", a, b);
|
|
@@ -32,7 +32,7 @@ import type { ConvergenceOptions } from "./convergence-options.js";
|
|
|
32
32
|
* @throws {RangeError} When `a ≤ 0` or `x < 0`.
|
|
33
33
|
* @throws {ConvergenceError} When neither expansion met the tolerance.
|
|
34
34
|
* @see {@link regularizedIncompleteGamma} when the answer is near 0.
|
|
35
|
-
* @see [Incomplete gamma and beta](https://anthochamp.
|
|
35
|
+
* @see [Incomplete gamma and beta](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/incomplete-gamma-beta/)
|
|
36
36
|
*/
|
|
37
37
|
export declare function regularizedIncompleteGammaUpper(a: number, x: number, options?: ConvergenceOptions): number;
|
|
38
38
|
//# sourceMappingURL=regularized-incomplete-gamma-upper.d.ts.map
|
|
@@ -33,7 +33,7 @@ import { ConvergenceError } from "./convergence-error.js";
|
|
|
33
33
|
* @throws {RangeError} When `a ≤ 0` or `x < 0`.
|
|
34
34
|
* @throws {ConvergenceError} When neither expansion met the tolerance.
|
|
35
35
|
* @see {@link regularizedIncompleteGamma} when the answer is near 0.
|
|
36
|
-
* @see [Incomplete gamma and beta](https://anthochamp.
|
|
36
|
+
* @see [Incomplete gamma and beta](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/incomplete-gamma-beta/)
|
|
37
37
|
*/
|
|
38
38
|
export function regularizedIncompleteGammaUpper(a, x, options) {
|
|
39
39
|
assertIncompleteGammaDomain_("regularizedIncompleteGammaUpper", a, x);
|
|
@@ -38,7 +38,7 @@ import type { ConvergenceOptions } from "./convergence-options.js";
|
|
|
38
38
|
* @throws {ConvergenceError} When neither expansion met the tolerance.
|
|
39
39
|
* @see {@link regularizedIncompleteGammaUpper} when the answer is small.
|
|
40
40
|
* @see {@link inverseRegularizedIncompleteGamma} to go the other way.
|
|
41
|
-
* @see [Incomplete gamma and beta](https://anthochamp.
|
|
41
|
+
* @see [Incomplete gamma and beta](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/incomplete-gamma-beta/)
|
|
42
42
|
*/
|
|
43
43
|
export declare function regularizedIncompleteGamma(a: number, x: number, options?: ConvergenceOptions): number;
|
|
44
44
|
//# sourceMappingURL=regularized-incomplete-gamma.d.ts.map
|
|
@@ -39,7 +39,7 @@ import { ConvergenceError } from "./convergence-error.js";
|
|
|
39
39
|
* @throws {ConvergenceError} When neither expansion met the tolerance.
|
|
40
40
|
* @see {@link regularizedIncompleteGammaUpper} when the answer is small.
|
|
41
41
|
* @see {@link inverseRegularizedIncompleteGamma} to go the other way.
|
|
42
|
-
* @see [Incomplete gamma and beta](https://anthochamp.
|
|
42
|
+
* @see [Incomplete gamma and beta](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/incomplete-gamma-beta/)
|
|
43
43
|
*/
|
|
44
44
|
export function regularizedIncompleteGamma(a, x, options) {
|
|
45
45
|
assertIncompleteGammaDomain_("regularizedIncompleteGamma", a, x);
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* @param intervals Number of panels; must be a positive integer.
|
|
30
30
|
* @returns The approximated integral.
|
|
31
31
|
* @throws {RangeError} When `intervals` is not a positive integer.
|
|
32
|
-
* @see [Numerical integration](https://anthochamp.
|
|
32
|
+
* @see [Numerical integration](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/calculus/quadrature/)
|
|
33
33
|
*/
|
|
34
34
|
export declare function trapezoidalRule(f: (x: number) => number, lower: number, upper: number, intervals?: number): number;
|
|
35
35
|
//# sourceMappingURL=trapezoidal-rule.d.ts.map
|
package/dist/trapezoidal-rule.js
CHANGED
|
@@ -30,7 +30,7 @@ import { PreciseSum } from "@ac-kit/core";
|
|
|
30
30
|
* @param intervals Number of panels; must be a positive integer.
|
|
31
31
|
* @returns The approximated integral.
|
|
32
32
|
* @throws {RangeError} When `intervals` is not a positive integer.
|
|
33
|
-
* @see [Numerical integration](https://anthochamp.
|
|
33
|
+
* @see [Numerical integration](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/calculus/quadrature/)
|
|
34
34
|
*/
|
|
35
35
|
export function trapezoidalRule(f, lower, upper, intervals = 1000) {
|
|
36
36
|
if (!Number.isInteger(intervals) || intervals < 1) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ac-kit/math-analysis",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Numerical analysis: roots, integrals, derivatives and differential equations approximated in a finite number of floating-point steps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"numerical-analysis",
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
"quadrature",
|
|
9
9
|
"root-finding"
|
|
10
10
|
],
|
|
11
|
-
"homepage": "https://anthochamp.
|
|
11
|
+
"homepage": "https://anthochamp.pages.grenadine.io/node-essentials/api/math-analysis/",
|
|
12
12
|
"bugs": {
|
|
13
|
-
"url": "https://
|
|
13
|
+
"url": "https://git.grenadine.io/anthochamp/node-essentials/issues"
|
|
14
14
|
},
|
|
15
15
|
"license": "BSD-3-Clause",
|
|
16
16
|
"author": "Anthony Champagne <dev@anthonychampagne.fr>",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "git+https://
|
|
19
|
+
"url": "git+https://git.grenadine.io/anthochamp/node-essentials.git",
|
|
20
20
|
"directory": "packages/math-analysis"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"prepack": "yarn build"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@ac-kit/core": "^0.
|
|
48
|
-
"@ac-kit/math-scalar": "^0.1.
|
|
49
|
-
"@types/web": "^0.0.
|
|
47
|
+
"@ac-kit/core": "^0.5.0",
|
|
48
|
+
"@ac-kit/math-scalar": "^0.1.4",
|
|
49
|
+
"@types/web": "^0.0.359"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@ac-kit/test-util": "0.
|
|
52
|
+
"@ac-kit/test-util": "0.2.0",
|
|
53
53
|
"@ac-kit/tsconfig": "0.1.0",
|
|
54
54
|
"@ac-kit/typedoc-config": "0.1.0",
|
|
55
55
|
"@ac-kit/vitest-config": "0.1.1",
|