\frac{x + y}{x - y}\frac{1}{\frac{x}{x + y} - \frac{1}{\frac{x + y}{y}}}double f(double x, double y) {
double r384331 = x;
double r384332 = y;
double r384333 = r384331 + r384332;
double r384334 = r384331 - r384332;
double r384335 = r384333 / r384334;
return r384335;
}
double f(double x, double y) {
double r384336 = 1.0;
double r384337 = x;
double r384338 = y;
double r384339 = r384337 + r384338;
double r384340 = r384337 / r384339;
double r384341 = r384339 / r384338;
double r384342 = r384336 / r384341;
double r384343 = r384340 - r384342;
double r384344 = r384336 / r384343;
return r384344;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied clear-num0.0
Simplified0.0
rmApplied div-sub0.0
Simplified0.0
Simplified0.0
rmApplied clear-num0.0
Final simplification0.0
herbie shell --seed 2019323
(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)))