def _S(kappa, alpha, beta):
kappa = <NUM_LIT:1.> * np.abs(kappa)<EOL>alpha = <NUM_LIT:1.> * alpha<EOL>beta = <NUM_LIT:1.> * np.abs(beta)<EOL>a_plus_b = alpha + beta<EOL>u = np.sqrt(kappa ** <NUM_LIT:2> + beta ** <NUM_LIT:2>)<EOL>if alpha == <NUM_LIT:0>:<EOL><INDENT>alpha_scale = <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>alpha_scale = alpha * np.log((alpha + u) / a_plus_b)<EOL><DEDENT>return u - beta - alpha_scale<EOL>
Compute the antiderivative of the Amos-type bound G on the modified
    Bessel function ratio.

    Note:  Handles scalar kappa, alpha, and beta only.

    See "S <-" in movMF.R and utility function implementation notes from
    https://cran.r-project.org/web/packages/movMF/index.html