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



Bits error versus x
Initial program 0.0
Applied *-un-lft-identity_binary640.0
Applied add-sqr-sqrt_binary640.0
Applied prod-diff_binary640.0
Final simplification0.0
herbie shell --seed 2022077
(FPCore (x)
:name "neg log"
:precision binary64
(- (log (- (/ 1.0 x) 1.0))))