fn
modified_bessel_k1
→Tensormodified_bessel_k1(x: Tensor)Modified Bessel function of the second kind, order 1.
Computes , the order-one analogue of . Diverges as near the origin and decays exponentially for large argument. Appears in Generalised-Inverse-Gaussian and Normal-Inverse-Gaussian log-densities.
Parameters
xTensorInput tensor; only is in the domain.
Returns
Tensor element-wise, same shape and dtype as x.
Notes
Asymptotic forms:
Implementation: Abramowitz & Stegun §9.8 two-branch polynomial,
accurate to . Use
scaled_modified_bessel_k1 for numerically stable
evaluation at large x.
Examples
>>> import lucid
>>> from lucid.special import modified_bessel_k1
>>> modified_bessel_k1(lucid.tensor([0.5, 1.0, 5.0]))
Tensor([1.6564, 0.6019, 0.0040])