\frac{-\left(f + n\right)}{f - n}\log \left(e^{\frac{-\left(n + f\right)}{f - n}}\right)double f(double f, double n) {
double r431246 = f;
double r431247 = n;
double r431248 = r431246 + r431247;
double r431249 = -r431248;
double r431250 = r431246 - r431247;
double r431251 = r431249 / r431250;
return r431251;
}
double f(double f, double n) {
double r431252 = n;
double r431253 = f;
double r431254 = r431252 + r431253;
double r431255 = -r431254;
double r431256 = r431253 - r431252;
double r431257 = r431255 / r431256;
double r431258 = exp(r431257);
double r431259 = log(r431258);
return r431259;
}



Bits error versus f



Bits error versus n
Results
Initial program 0.0
rmApplied add-log-exp0.0
Final simplification0.0
herbie shell --seed 2019154 +o rules:numerics
(FPCore (f n)
:name "subtraction fraction"
(/ (- (+ f n)) (- f n)))