\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 r446108 = x;
double r446109 = y;
double r446110 = r446108 + r446109;
double r446111 = 2.0;
double r446112 = r446108 * r446111;
double r446113 = r446112 * r446109;
double r446114 = r446110 / r446113;
return r446114;
}
double f(double x, double y) {
double r446115 = 0.5;
double r446116 = 1.0;
double r446117 = y;
double r446118 = r446116 / r446117;
double r446119 = x;
double r446120 = r446116 / r446119;
double r446121 = r446115 * r446120;
double r446122 = fma(r446115, r446118, r446121);
return r446122;
}




Bits error versus x




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