\frac{-\left(f + n\right)}{f - n}
\log \left(e^{\frac{f + n}{n - f}}\right)
(FPCore (f n) :precision binary64 (/ (- (+ f n)) (- f n)))
(FPCore (f n) :precision binary64 (log (exp (/ (+ f n) (- n f)))))
double code(double f, double n) {
return -(f + n) / (f - n);
}
double code(double f, double n) {
return log(exp((f + n) / (n - f)));
}



Bits error versus f



Bits error versus n
Results
Initial program 0.0
Simplified0.0
Applied add-cbrt-cube_binary640.0
Simplified0.0
Applied add-log-exp_binary640.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2022055
(FPCore (f n)
:name "subtraction fraction"
:precision binary64
(/ (- (+ f n)) (- f n)))