\frac{x + y}{\left(x \cdot 2\right) \cdot y}\mathsf{fma}\left(0.5, \frac{1}{y}, 0.5 \cdot \frac{1}{x}\right)double f(double x, double y) {
double r516956 = x;
double r516957 = y;
double r516958 = r516956 + r516957;
double r516959 = 2.0;
double r516960 = r516956 * r516959;
double r516961 = r516960 * r516957;
double r516962 = r516958 / r516961;
return r516962;
}
double f(double x, double y) {
double r516963 = 0.5;
double r516964 = 1.0;
double r516965 = y;
double r516966 = r516964 / r516965;
double r516967 = x;
double r516968 = r516964 / r516967;
double r516969 = r516963 * r516968;
double r516970 = fma(r516963, r516966, r516969);
return r516970;
}




Bits error versus x




Bits error versus y
| Original | 15.3 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 15.3
Taylor expanded around 0 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020024 +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)))