\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 r452665 = x;
double r452666 = y;
double r452667 = r452665 + r452666;
double r452668 = 2.0;
double r452669 = r452665 * r452668;
double r452670 = r452669 * r452666;
double r452671 = r452667 / r452670;
return r452671;
}
double f(double x, double y) {
double r452672 = 0.5;
double r452673 = 1.0;
double r452674 = y;
double r452675 = r452673 / r452674;
double r452676 = x;
double r452677 = r452673 / r452676;
double r452678 = r452672 * r452677;
double r452679 = fma(r452672, r452675, r452678);
return r452679;
}




Bits error versus x




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