Docs / jax4j-core / com.nablatensor.jax4j.ops

final class

SpecialFn

Tape-level special functions the primitive op set does not provide directly: the normal CDF/PDF and a general power.

normCdf uses the Page/Bagby logistic approximation 1 / (1 + exp(-(1.5976 x + 0.070566 x^3))): everywhere smooth (so its adjoint is well behaved), odd about the mean, and accurate to about 1.4e-4 absolute.

Methods

static SDouble normCdf(AadRecorder rec, SDouble x)

Standard normal CDF, N(x). Smooth logistic approximation.

static SDouble normPdf(SDouble x)

Standard normal PDF, phi(x). Exact.

static SDouble erf(AadRecorder rec, SDouble x)

erf(x), via erf(x) = 2 N(x sqrt 2) - 1.

static SDouble pow(SDouble x, double p)

x ^ p for a constant exponent; requires x > 0.

static SDouble pow(SDouble x, SDouble p)

x ^ p for a differentiable exponent; requires x > 0.