\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)
\begin{array}{l}
t_0 := \sqrt{\sqrt{1 - x \cdot x}}\\
\log \left(\frac{1}{x} + t_0 \cdot \frac{t_0}{x}\right)
\end{array}
(FPCore (x) :precision binary64 (log (+ (/ 1.0 x) (/ (sqrt (- 1.0 (* x x))) x))))
(FPCore (x) :precision binary64 (let* ((t_0 (sqrt (sqrt (- 1.0 (* x x)))))) (log (+ (/ 1.0 x) (* t_0 (/ t_0 x))))))
double code(double x) {
return log((1.0 / x) + (sqrt(1.0 - (x * x)) / x));
}
double code(double x) {
double t_0 = sqrt(sqrt(1.0 - (x * x)));
return log((1.0 / x) + (t_0 * (t_0 / x)));
}



Bits error versus x
Results
Initial program 0.0
Applied *-un-lft-identity_binary640.0
Applied add-sqr-sqrt_binary640.0
Applied times-frac_binary640.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2022066
(FPCore (x)
:name "Hyperbolic arc-(co)secant"
:precision binary64
(log (+ (/ 1.0 x) (/ (sqrt (- 1.0 (* x x))) x))))