\frac{-\left(f + n\right)}{f - n}\log \left(e^{\frac{-\left(f + n\right)}{f - n}}\right)double f(double f, double n) {
double r40004 = f;
double r40005 = n;
double r40006 = r40004 + r40005;
double r40007 = -r40006;
double r40008 = r40004 - r40005;
double r40009 = r40007 / r40008;
return r40009;
}
double f(double f, double n) {
double r40010 = f;
double r40011 = n;
double r40012 = r40010 + r40011;
double r40013 = -r40012;
double r40014 = r40010 - r40011;
double r40015 = r40013 / r40014;
double r40016 = exp(r40015);
double r40017 = log(r40016);
return r40017;
}



Bits error versus f



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