A collection of special math functions written in JavaScript with full complex support! I'm looking for contributors to help test and more functionality to the library so feel free to make an issue or puul request with you suggestions!
Grab the special.js
or special.min.js
from the repo and add it to your project to get started
Documentation for the library lives here. All the functions are in a namespace and can be used using the special.
prefix
A constructor used to create a complex number. Can be used without the new
keyword using special.complex(a, b)
Returns the sum of a complex number
Returns the difference of a complex number
Returns the product of a complex number
Returns the quotient of a complex number
Returns the conjugate of a complex number
Returns the magnitude (absolute value) of a complex number
Returns the sum of 2 complex numbers
Returns the difference of 2 complex numbers
Returns the product of 2 complex numbers
Returns the quotient of 2 complex numbers
Returns the exponential function of a complex number
Returns the square root of a complex number
Returns the polar form of a cartesian complex number
Returns the cartesian form of a polar complex number
Returns the power of a complex number to another
Returns the absolute value of a complex number
Returns the argument of a complex number
Returns the natural logarithm of a complex number
Returns the sin
of a complex number
Returns the cos
of a complex number
Returns the tan
of a complex number
Returns the sinh
of a complex number
Returns the cosh
of a complex number
Returns the tanh
of a complex number
Returns the arcsin
of a complex number
Returns the arccos
of a complex number
Returns the arctan
of a complex number
Returns the gcd
of a 2 integers
Returns the lcm
of a 2 integers
Returns a boolean value determining the primality of an integer
Returns the mobius mu
function of an integer
Returns nCr
of 2 numbers making use of the gamma function to extend the definition to all of the complex plane
Returns the gamma function of a complex number defined by
Returns the nth Bernoulli number making use of the equation
Returns the factorial of a positive integer
Returns the analytic continuation of the Riemann Zeta Function for the entire complex plane aside from 1e-3
at default. Computation makes use of the function
Returns the beta function of 2 complex numbers defined by
Returns the lower incomplete gamma function defined by 1e-3
Returns the incomplete gamma function defined by 1e-3
Returns the Logarithmic Integral function defined by 1e-3
by default
Returns the Exponential Integral function defined by 1e-3
by default
Returns the Sine Integral function defined by 1e-3
by default
Returns the Cosine Integral function defined by 1e-3
by default
Returns the Error function defined by 1e-3
by default
Returns the Lambert W function defined by begin the inverse of 1e-3
Returns the Arithmetic-Geometric Mean of 2 numbers using the iteration formula 1e-3