fn
modified_bessel_k0
→Tensormodified_bessel_k0(x: Tensor)Modified Bessel function of the second kind, order 0.
Computes , the exponentially decaying solution of the modified Bessel equation at order 0. Appears as the Green's function of the 2D Helmholtz operator and as the log-density kernel of certain heavy-tailed distributions.
Parameters
xTensorInput tensor; only is in the domain. Any
floating-point dtype.
Returns
Tensor element-wise, same shape and dtype as x.
Notes
Asymptotic forms:
Implementation: Abramowitz & Stegun §9.8 polynomial branches at the
cutoff , accurate to . For
numerically stable evaluation at large arguments use
scaled_modified_bessel_k0.
Examples
>>> import lucid
>>> from lucid.special import modified_bessel_k0
>>> modified_bessel_k0(lucid.tensor([0.5, 1.0, 5.0]))
Tensor([0.9244, 0.4210, 0.0037])