x + \frac{\left(y - x\right) \cdot z}{t}\mathsf{fma}\left(\frac{z}{t}, y - x, x\right)double f(double x, double y, double z, double t) {
double r563319 = x;
double r563320 = y;
double r563321 = r563320 - r563319;
double r563322 = z;
double r563323 = r563321 * r563322;
double r563324 = t;
double r563325 = r563323 / r563324;
double r563326 = r563319 + r563325;
return r563326;
}
double f(double x, double y, double z, double t) {
double r563327 = z;
double r563328 = t;
double r563329 = r563327 / r563328;
double r563330 = y;
double r563331 = x;
double r563332 = r563330 - r563331;
double r563333 = fma(r563329, r563332, r563331);
return r563333;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
| Original | 6.3 |
|---|---|
| Target | 2.2 |
| Herbie | 2.3 |
Initial program 6.3
Simplified6.3
rmApplied div-sub6.3
rmApplied div-inv6.3
Applied fma-neg6.3
Taylor expanded around inf 6.3
Simplified2.3
Final simplification2.3
herbie shell --seed 2019351 +o rules:numerics
(FPCore (x y z t)
:name "Numeric.Histogram:binBounds from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< x -9.025511195533005e-135) (- x (* (/ z t) (- x y))) (if (< x 4.275032163700715e-250) (+ x (* (/ (- y x) t) z)) (+ x (/ (- y x) (/ t z)))))
(+ x (/ (* (- y x) z) t)))