← SPL reference

newMath (lib/newMath.spl)

Pure SPL math: constants pi, e, and ln2; transcendental function.exp and function.ln (Chebyshev-fit minimax-style Horner polynomials, no Python math.exp / log in the interpreter); function.power uses exact integer loops when b is integral and exp(b * ln(a)) for fractional exponents. Also function.abs, GCD, etc. Load with use newMath; (extensionless import is allowed because the file starts with reqFileExtension.setVar(false);).

Import

use newMath;
print.number(pi);
print.number(function.power(2, 8));

Constants

Functions

Implementation: someProgrammingLanguage/lib/newMath.spl