fn

scaled_modified_bessel_k1

Tensor
scaled_modified_bessel_k1(x: Tensor)
source

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

xTensor
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 xx \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.6362, 0.6001, 0.2820])