Docs / nablatensor-ops / com.nablatensor.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. For a reference-grade value use com.nablatensor.quant.BlackScholes.N — that one is not tape-safe.
Methods
static ADouble normCdf(AadRecorder rec, ADouble x)
Standard normal CDF, N(x). Smooth logistic approximation.
static ADouble normPdf(ADouble x)
Standard normal PDF, phi(x). Exact.
static ADouble erf(AadRecorder rec, ADouble x)
erf(x), via erf(x) = 2 N(x sqrt 2) - 1.
static ADouble pow(ADouble x, double p)
x ^ p for a constant exponent; requires x > 0.
static ADouble pow(ADouble x, ADouble p)
x ^ p for a differentiable exponent; requires x > 0.