\frac{x + y}{x - y}\frac{1}{\frac{x}{x + y} - \frac{1}{\frac{x + y}{y}}}double f(double x, double y) {
double r351302 = x;
double r351303 = y;
double r351304 = r351302 + r351303;
double r351305 = r351302 - r351303;
double r351306 = r351304 / r351305;
return r351306;
}
double f(double x, double y) {
double r351307 = 1.0;
double r351308 = x;
double r351309 = y;
double r351310 = r351308 + r351309;
double r351311 = r351308 / r351310;
double r351312 = r351310 / r351309;
double r351313 = r351307 / r351312;
double r351314 = r351311 - r351313;
double r351315 = r351307 / r351314;
return r351315;
}




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
rmApplied div-sub0.0
rmApplied clear-num0.0
Final simplification0.0
herbie shell --seed 2019323 +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)))