\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 r968358 = f;
double r968359 = n;
double r968360 = r968358 + r968359;
double r968361 = -r968360;
double r968362 = r968358 - r968359;
double r968363 = r968361 / r968362;
return r968363;
}
double f(double f, double n) {
double r968364 = n;
double r968365 = f;
double r968366 = r968364 + r968365;
double r968367 = -r968366;
double r968368 = r968365 - r968364;
double r968369 = r968367 / r968368;
double r968370 = exp(r968369);
double r968371 = log(r968370);
return r968371;
}



Bits error versus f



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