\frac{x + y}{x - y}\frac{1}{\frac{x}{x + y} - \frac{y}{x + y}}double f(double x, double y) {
double r446905 = x;
double r446906 = y;
double r446907 = r446905 + r446906;
double r446908 = r446905 - r446906;
double r446909 = r446907 / r446908;
return r446909;
}
double f(double x, double y) {
double r446910 = 1.0;
double r446911 = x;
double r446912 = y;
double r446913 = r446911 + r446912;
double r446914 = r446911 / r446913;
double r446915 = r446912 / r446913;
double r446916 = r446914 - r446915;
double r446917 = r446910 / r446916;
return r446917;
}




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
Final simplification0.0
herbie shell --seed 2019194 +o rules:numerics
(FPCore (x y)
:name "Linear.Projection:perspective from linear-1.19.1.3, A"
:herbie-target
(/ 1.0 (- (/ x (+ x y)) (/ y (+ x y))))
(/ (+ x y) (- x y)))