\frac{x + y}{x - y}\frac{x + y}{x - y}double f(double x, double y) {
double r477730 = x;
double r477731 = y;
double r477732 = r477730 + r477731;
double r477733 = r477730 - r477731;
double r477734 = r477732 / r477733;
return r477734;
}
double f(double x, double y) {
double r477735 = x;
double r477736 = y;
double r477737 = r477735 + r477736;
double r477738 = r477735 - r477736;
double r477739 = r477737 / r477738;
return r477739;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied add-log-exp0.0
rmApplied *-un-lft-identity0.0
Applied *-un-lft-identity0.0
Applied times-frac0.0
Applied exp-prod0.0
Applied log-pow0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020020 +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)))