\frac{x + y}{x - y}\frac{\frac{1}{x - y}}{\frac{1}{x + y}}double f(double x, double y) {
double r625549 = x;
double r625550 = y;
double r625551 = r625549 + r625550;
double r625552 = r625549 - r625550;
double r625553 = r625551 / r625552;
return r625553;
}
double f(double x, double y) {
double r625554 = 1.0;
double r625555 = x;
double r625556 = y;
double r625557 = r625555 - r625556;
double r625558 = r625554 / r625557;
double r625559 = r625555 + r625556;
double r625560 = r625554 / r625559;
double r625561 = r625558 / r625560;
return r625561;
}




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-inv0.2
Applied associate-/r*0.0
Final simplification0.0
herbie shell --seed 2020036
(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)))