special-mathematical-functions

    math
    function
    calculus
    Download zip
    Version
    0.1.2
    License
    Apache-2.0
    Last updated
    last year
    Downloads
    28

    #enanandesu/special-mathematical-functions

    #已实现:

    • #椭圆函数与椭圆积分

    • #误差函数

    • #菲涅尔积分

    • #函数求逆

    • #伽马函数和相关函数

    • #二分法求解单调方程

    beta

    fn beta(a : Double, b : Double) -> Double

    betainc

    fn betainc(a : Double, b : Double, x : Double) -> Double

    betaincc

    fn betaincc(a : Double, b : Double, x : Double) -> Double

    betainccinv

    fn betainccinv(a : Double, b : Double, y : Double) -> Double

    betaincinv

    fn betaincinv(a : Double, b : Double, y : Double) -> Double

    betaln

    fn betaln(a : Double, b : Double) -> Double

    bisection_guess

    fn bisection_guess(target : Double, f : (Double) -> Double, min_range : Double, max_range : Double, max_iterations? : Int, tol? : Double, monotonicity : String) -> Double?

    dawsn

    fn dawsn(x : Double) -> Double

    Dawson's integral.

    digamma

    fn digamma(x : Double) -> Double

    ellipe

    fn ellipe(m : Double) -> Double

    Complete elliptic integral of the second kind E(m)

    ellipeinc

    fn ellipeinc(phi : Double, m : Double) -> Double

    Incomplete elliptic integral of the second kind F(phi, m)

    ellipj

    fn ellipj(u : Double, m : Double) -> (Double, Double, Double, Double)

    Jacobian elliptic functions sn, cn, dn and amplitude am Similar to SciPy's ellipj function

    Parameters:
    • u: argument
    • m: parameter (0 <= m < 1)

    Returns: (sn, cn, dn, phi) where phi is the amplitude

    ellipk

    fn ellipk(m : Double) -> Double

    Complete elliptic integral of the first kind K(m)

    ellipkinc

    fn ellipkinc(phi : Double, m : Double) -> Double

    Incomplete elliptic integral of the first kind F(phi, m)

    erf

    fn erf(x : Double) -> Double

    Returns the error function of argument.

    erfc

    fn erfc(x : Double) -> Double

    Complementary error function, 1 - erf(x).

    erfcinv

    fn erfcinv(y : Double) -> Double

    Inverse of the complementary error function.

    erfcx

    fn erfcx(x : Double) -> Double

    Scaled complementary error function, exp(x**2) * erfc(x).

    erfinv

    fn erfinv(x : Double) -> Double

    Inverse of the error function.

    fresnel

    fn fresnel(x : Double) -> (Double, Double)

    Fresnel integrals.

    func_inv

    fn func_inv(target : Double, f : (Double) -> Double, d : (Double) -> Double, initial_guess : Double, max_iterations? : Int, tol? : Double) -> Double?

    Calculates the inverse of a function

    gamma

    fn gamma(x : Double) -> Double

    gammainc

    fn gammainc(a : Double, x : Double) -> Double

    gammaincinv

    fn gammaincinv(a : Double, y : Double) -> Double

    gammaln

    fn gammaln(x : Double) -> Double

    gammasgn

    fn gammasgn(x : Double) -> Double

    poch

    fn poch(z : Double, m : Double) -> Double

    polygamma

    fn polygamma(n : Int, x : Double) -> Double

    rgamma

    fn rgamma(x : Double) -> Double