No matching definitions.

stats/mathx

src/stats/mathx.tur
defn

mathx-erf

(mathx-erf [x :float] :float)

error function erf(x).

xargument

erf(x) in [-1, 1].

(mathx-erf 0.0)  ; => 0.0
  (mathx-erf 1.0)  ; => ~0.8427

Since: ST0

defn

mathx-erfc

(mathx-erfc [x :float] :float)

complementary error function erfc(x) = 1 - erf(x).

xargument

erfc(x) in [0, 2].

(mathx-erfc 0.0)  ; => 1.0

Since: ST0

defn

mathx-lgamma

(mathx-lgamma [x :float] :float)

natural log of the absolute value of gamma(x).

xargument (must not be a non-positive integer)

ln|gamma(x)|

(mathx-lgamma 5.0)  ; => ~3.1781 (= ln(24))

Since: ST0

defn

mathx-tgamma

(mathx-tgamma [x :float] :float)

true gamma function gamma(x).

xargument

gamma(x)

(mathx-tgamma 5.0)  ; => 24.0

Since: ST0

defn

mathx-expm1

(mathx-expm1 [x :float] :float)

exp(x) - 1, accurate near zero.

xargument

exp(x) - 1

(mathx-expm1 0.0)   ; => 0.0
  (mathx-expm1 1e-10) ; => ~1e-10 (much more accurate than (- (exp 1e-10) 1))

Since: ST0

defn

mathx-log1p

(mathx-log1p [x :float] :float)

ln(1 + x), accurate near zero.

xargument (x > -1)

ln(1 + x)

(mathx-log1p 0.0)   ; => 0.0
  (mathx-log1p 1e-10) ; => ~1e-10

Since: ST0