slangmath 1.0.6 → 1.1.0
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/package.json +54 -23
- package/slang-complex.js +954 -0
- package/slang-linalg.js +1156 -0
- package/slang-math.js +83 -8
- package/slang-ode.js +1082 -0
- package/slang-stats.js +1206 -0
- package/slang-symbolic.js +1616 -0
package/slang-math.js
CHANGED
|
@@ -1,11 +1,86 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SLaNg
|
|
3
|
-
*
|
|
2
|
+
* slang-math.js — SLaNg Central Export Hub
|
|
3
|
+
* ─────────────────────────────────────────────
|
|
4
|
+
* Saad's Language for Analytical Numerics and Geometry
|
|
5
|
+
*
|
|
6
|
+
* Import everything from a single entry point:
|
|
7
|
+
*
|
|
8
|
+
* import { createFraction, symDiff, rk4, svd, describe, C } from './slang-math.js';
|
|
9
|
+
*
|
|
10
|
+
* ─── Original Modules ────────────────────────────────────────────────────────
|
|
11
|
+
* slang-basic.js Core polynomial/fraction engine
|
|
12
|
+
* slang-advanced.js Taylor, limits, arc length, Lagrange multipliers
|
|
13
|
+
* slang-helpers.js High-level builder utilities
|
|
14
|
+
* slang-convertor.js Bidirectional LaTeX ↔ SLaNg converter
|
|
15
|
+
* slang-extended.js Extended functions + multivariable calculus
|
|
16
|
+
* slang-cache.js LRU caching + performance monitoring
|
|
17
|
+
* slang-errors.js Typed error classes
|
|
18
|
+
*
|
|
19
|
+
* ─── New Modules ─────────────────────────────────────────────────────────────
|
|
20
|
+
* slang-symbolic.js Full symbolic calculus engine
|
|
21
|
+
* · Chain/product/quotient rule differentiation
|
|
22
|
+
* · Symbolic antiderivatives (trig, exp, log, powers)
|
|
23
|
+
* · Taylor/Maclaurin series
|
|
24
|
+
* · L'Hôpital limits
|
|
25
|
+
* · Gradient, Hessian, implicit differentiation
|
|
26
|
+
* · Critical point classification
|
|
27
|
+
* · LaTeX rendering of symbolic expressions
|
|
28
|
+
*
|
|
29
|
+
* slang-ode.js ODE & PDE solvers
|
|
30
|
+
* · Euler, Heun, RK4, adaptive RK45
|
|
31
|
+
* · Implicit Euler, Crank-Nicolson (stiff)
|
|
32
|
+
* · Systems of ODEs, 2nd-order ODEs
|
|
33
|
+
* · Phase portraits, equilibria finder
|
|
34
|
+
* · Shooting method (BVP)
|
|
35
|
+
* · 1D Heat equation, Wave equation, Laplace/Poisson
|
|
36
|
+
* · Event detection (zero crossings)
|
|
37
|
+
*
|
|
38
|
+
* slang-linalg.js Linear algebra
|
|
39
|
+
* · LU, QR, Cholesky decompositions
|
|
40
|
+
* · SVD, pseudo-inverse, null space, rank
|
|
41
|
+
* · Least squares, conjugate gradient
|
|
42
|
+
* · Eigenvalues (QR algorithm), power iteration
|
|
43
|
+
* · Numerical Jacobian, Hessian, gradient
|
|
44
|
+
* · Newton-Raphson, gradient descent
|
|
45
|
+
* · PCA, rotation matrices, tridiagonal solver
|
|
46
|
+
*
|
|
47
|
+
* slang-stats.js Statistics & probability
|
|
48
|
+
* · Descriptive statistics (mean, variance, skewness…)
|
|
49
|
+
* · Distributions: Normal, t, χ², Poisson, Binomial,
|
|
50
|
+
* Gamma, Beta, Weibull, Log-Normal, Exponential
|
|
51
|
+
* · Hypothesis tests: z, t (one & two sample), χ²
|
|
52
|
+
* · Mann-Whitney U (nonparametric)
|
|
53
|
+
* · Bayesian conjugate updates (Beta-Binomial, Normal)
|
|
54
|
+
* · Bootstrap confidence intervals
|
|
55
|
+
* · Effect size (Cohen's d), power/sample-size analysis
|
|
56
|
+
* · Pearson & Spearman correlation, covariance matrix
|
|
57
|
+
* · Linear & polynomial regression
|
|
58
|
+
* · Monte Carlo integration & sampling
|
|
59
|
+
*
|
|
60
|
+
* slang-complex.js Complex number analysis
|
|
61
|
+
* · Arithmetic, polar form, complex functions
|
|
62
|
+
* · Nth roots, polynomial roots (Aberth-Ehrlich)
|
|
63
|
+
* · Contour & circle integrals, residues
|
|
64
|
+
* · Cauchy-Riemann equations, analyticity check
|
|
65
|
+
* · Möbius transformations, conformal maps
|
|
66
|
+
* · Power series, radius of convergence
|
|
67
|
+
* · Joukowski transform
|
|
68
|
+
* · FFT / IFFT (Cooley-Tukey)
|
|
69
|
+
* · Quaternions (Hamilton product, SLERP, rotations)
|
|
4
70
|
*/
|
|
5
71
|
|
|
6
|
-
//
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
72
|
+
// ── Original modules ──────────────────────────────────────────────────────────
|
|
73
|
+
export * from './slang-basic.js';
|
|
74
|
+
export * from './slang-advanced.js';
|
|
75
|
+
export * from './slang-helpers.js';
|
|
76
|
+
export * from './slang-convertor.js';
|
|
77
|
+
export * from './slang-extended.js';
|
|
78
|
+
export * from './slang-cache.js';
|
|
79
|
+
export * from './slang-errors.js';
|
|
80
|
+
|
|
81
|
+
// ── New modules ───────────────────────────────────────────────────────────────
|
|
82
|
+
export * from './slang-symbolic.js';
|
|
83
|
+
export * from './slang-ode.js';
|
|
84
|
+
export * from './slang-linalg.js';
|
|
85
|
+
export * from './slang-stats.js';
|
|
86
|
+
export * from './slang-complex.js';
|