Skip to main content

langevin_primal

Function langevin_primal 

Source
pub fn langevin_primal<P, E, V, const N: usize, const ONE_MINUS: bool>(
    x: V,
    small: &[E; N],
) -> (V, V)
Expand description

L(x) (or, with ONE_MINUS, 1 - L(x)) and L'(x) together.

L' costs no transcendental of its own: on the small branch it is 1 - L^2 - 2L/x (which is exact algebra, and cancels only ~2 bits there since L ~ x/3), on the large branch 1/x^2 - csch^2(x) from the same q.

The complement is not a second kernel: on the large branch 1 - L = (1 - q(2x+1)) r with the same q and division (no cancellation, q(2x+1) <= 0.092 at x = 2), on the small one 1 - x p where 1 - L >= 0.46. It exists because 1 - L(x) is what sits against L^-1’s pole in the vMF convolution, and forming it from L loses every digit once L rounds to 1 (x > 1/u, i.e. sharpness ~1e7 in f32).

Last built: 2026-09-08 21:35:55 UTC