\frac{-\left(f + n\right)}{f - n}\frac{\mathsf{fma}\left(\left(\frac{f}{n - f} \cdot \frac{f}{n - f}\right), \left(\frac{f}{n - f}\right), \left(\frac{n}{n - f} \cdot \left(\frac{n}{n - f} \cdot \frac{n}{n - f}\right)\right)\right)}{\mathsf{fma}\left(\left(\frac{f}{n - f}\right), \left(\frac{f}{n - f}\right), \left(\frac{n}{n - f}\right)\right)}double f(double f, double n) {
double r403397 = f;
double r403398 = n;
double r403399 = r403397 + r403398;
double r403400 = -r403399;
double r403401 = r403397 - r403398;
double r403402 = r403400 / r403401;
return r403402;
}
double f(double f, double n) {
double r403403 = f;
double r403404 = n;
double r403405 = r403404 - r403403;
double r403406 = r403403 / r403405;
double r403407 = r403406 * r403406;
double r403408 = r403404 / r403405;
double r403409 = r403408 * r403408;
double r403410 = r403408 * r403409;
double r403411 = fma(r403407, r403406, r403410);
double r403412 = fma(r403406, r403406, r403408);
double r403413 = r403411 / r403412;
return r403413;
}



Bits error versus f



Bits error versus n
Initial program 0.0
rmApplied frac-2neg0.0
Simplified0.0
Simplified0.0
rmApplied flip--31.6
Applied associate-/r/31.7
Simplified0.2
rmApplied distribute-rgt-in0.2
rmApplied flip3-+0.2
Simplified0.2
Simplified0.0
Final simplification0.0
herbie shell --seed 2019133 +o rules:numerics
(FPCore (f n)
:name "subtraction fraction"
(/ (- (+ f n)) (- f n)))