x + \frac{\left(y - x\right) \cdot z}{t}\begin{array}{l}
\mathbf{if}\;x + \frac{\left(y - x\right) \cdot z}{t} \le 6.92785629516221491 \cdot 10^{-263} \lor \neg \left(x + \frac{\left(y - x\right) \cdot z}{t} \le 1.75952401416843627 \cdot 10^{307}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\
\end{array}double f(double x, double y, double z, double t) {
double r585550 = x;
double r585551 = y;
double r585552 = r585551 - r585550;
double r585553 = z;
double r585554 = r585552 * r585553;
double r585555 = t;
double r585556 = r585554 / r585555;
double r585557 = r585550 + r585556;
return r585557;
}
double f(double x, double y, double z, double t) {
double r585558 = x;
double r585559 = y;
double r585560 = r585559 - r585558;
double r585561 = z;
double r585562 = r585560 * r585561;
double r585563 = t;
double r585564 = r585562 / r585563;
double r585565 = r585558 + r585564;
double r585566 = 6.927856295162215e-263;
bool r585567 = r585565 <= r585566;
double r585568 = 1.7595240141684363e+307;
bool r585569 = r585565 <= r585568;
double r585570 = !r585569;
bool r585571 = r585567 || r585570;
double r585572 = r585561 / r585563;
double r585573 = fma(r585572, r585560, r585558);
double r585574 = r585571 ? r585573 : r585565;
return r585574;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
| Original | 6.5 |
|---|---|
| Target | 1.8 |
| Herbie | 1.1 |
if (+ x (/ (* (- y x) z) t)) < 6.927856295162215e-263 or 1.7595240141684363e+307 < (+ x (/ (* (- y x) z) t)) Initial program 11.3
Simplified6.0
rmApplied fma-udef6.0
Simplified1.5
rmApplied clear-num1.5
rmApplied *-un-lft-identity1.5
Applied *-un-lft-identity1.5
Applied distribute-lft-out1.5
Simplified1.5
if 6.927856295162215e-263 < (+ x (/ (* (- y x) z) t)) < 1.7595240141684363e+307Initial program 0.5
Final simplification1.1
herbie shell --seed 2020043 +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)))