\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 r652984 = x;
double r652985 = y;
double r652986 = r652984 + r652985;
double r652987 = 2.0;
double r652988 = r652984 * r652987;
double r652989 = r652988 * r652985;
double r652990 = r652986 / r652989;
return r652990;
}
double f(double x, double y) {
double r652991 = 0.5;
double r652992 = 1.0;
double r652993 = y;
double r652994 = r652992 / r652993;
double r652995 = x;
double r652996 = r652992 / r652995;
double r652997 = r652991 * r652996;
double r652998 = fma(r652991, r652994, r652997);
return r652998;
}




Bits error versus x




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