\frac{x + y}{x - y}\frac{\frac{1}{x - y}}{\frac{1}{x + y}}double f(double x, double y) {
double r468723 = x;
double r468724 = y;
double r468725 = r468723 + r468724;
double r468726 = r468723 - r468724;
double r468727 = r468725 / r468726;
return r468727;
}
double f(double x, double y) {
double r468728 = 1.0;
double r468729 = x;
double r468730 = y;
double r468731 = r468729 - r468730;
double r468732 = r468728 / r468731;
double r468733 = r468729 + r468730;
double r468734 = r468728 / r468733;
double r468735 = r468732 / r468734;
return r468735;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
Simplified0.0
rmApplied clear-num0.0
rmApplied div-inv0.2
Applied associate-/r*0.0
Final simplification0.0
herbie shell --seed 2019174
(FPCore (x y)
:name "Linear.Projection:perspective from linear-1.19.1.3, A"
:herbie-target
(/ 1.0 (- (/ x (+ x y)) (/ y (+ x y))))
(/ (+ x y) (- x y)))