\frac{x + y}{x - y}\frac{x}{x - y} + \frac{y}{x - y}double f(double x, double y) {
double r532741 = x;
double r532742 = y;
double r532743 = r532741 + r532742;
double r532744 = r532741 - r532742;
double r532745 = r532743 / r532744;
return r532745;
}
double f(double x, double y) {
double r532746 = x;
double r532747 = y;
double r532748 = r532746 - r532747;
double r532749 = r532746 / r532748;
double r532750 = r532747 / r532748;
double r532751 = r532749 + r532750;
return r532751;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied flip--31.2
Applied associate-/r/31.3
Simplified0.2
rmApplied distribute-lft-in0.2
Simplified0.1
Simplified0.0
Final simplification0.0
herbie shell --seed 2020081 +o rules:numerics
(FPCore (x y)
:name "Linear.Projection:perspective from linear-1.19.1.3, A"
:precision binary64
:herbie-target
(/ 1 (- (/ x (+ x y)) (/ y (+ x y))))
(/ (+ x y) (- x y)))