Skip to content
fn

scaled_modified_bessel_k1

→Tensor
scaled_modified_bessel_k1(x: Tensor)

Exponentially scaled modified Bessel K1K_1: exK1(x)e^x K_1(x).

Computes exK1(x)e^x K_1(x), the bounded scaled variant of modified_bessel_k1 suitable for stable evaluation of log-densities involving K1K_1 at large argument.

Parameters

Input tensor; only x>0x > 0 is in the domain.

Returns

Tensor

exK1(x)e^x K_1(x) element-wise, same shape and dtype as x.

Notes

Asymptotic: exK1(x)∼π/(2x)e^x K_1(x) \sim \sqrt{\pi/(2x)} as x→∞x \to \infty.

Examples

>>> import lucid
>>> from lucid.special import scaled_modified_bessel_k1
>>> scaled_modified_bessel_k1(lucid.tensor([1.0, 5.0, 20.0]))
tensor([1.636, 0.6003, 0.2854])