\frac{x + y}{\left(x \cdot 2\right) \cdot y}\frac{0.5}{y} + \frac{0.5}{x}double f(double x, double y) {
double r586903 = x;
double r586904 = y;
double r586905 = r586903 + r586904;
double r586906 = 2.0;
double r586907 = r586903 * r586906;
double r586908 = r586907 * r586904;
double r586909 = r586905 / r586908;
return r586909;
}
double f(double x, double y) {
double r586910 = 0.5;
double r586911 = y;
double r586912 = r586910 / r586911;
double r586913 = x;
double r586914 = r586910 / r586913;
double r586915 = r586912 + r586914;
return r586915;
}




Bits error versus x




Bits error versus y
Results
| Original | 15.5 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 15.5
Taylor expanded around 0 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020042 +o rules:numerics
(FPCore (x y)
:name "Linear.Projection:inversePerspective from linear-1.19.1.3, C"
:precision binary64
:herbie-target
(+ (/ 0.5 x) (/ 0.5 y))
(/ (+ x y) (* (* x 2) y)))