Introduce . Solving the quadratic and using its product of roots gives
Both roots are positive, with ; equality occurs only for . For computation, the smaller root has the equivalent cancellation-free form
This is stable root evaluation for inverse Gaussian sampling.
Define . It decreases from infinity to zero on and increases from zero to infinity on , since
The two roots are precisely its inverse branches. This supplies the Jacobians needed for the reciprocal-root inverse Gaussian sampler.