\frac{-\left(f + n\right)}{f - n}\frac{-1}{\frac{f - n}{f + n}}double code(double f, double n) {
return (-(f + n) / (f - n));
}
double code(double f, double n) {
return (-1.0 / ((f - n) / (f + n)));
}



Bits error versus f



Bits error versus n
Results
Initial program 0.0
rmApplied neg-mul-10.0
Applied associate-/l*0.0
Final simplification0.0
herbie shell --seed 2020106 +o rules:numerics
(FPCore (f n)
:name "subtraction fraction"
:precision binary64
(/ (- (+ f n)) (- f n)))