x + \frac{\left(y - x\right) \cdot z}{t}\begin{array}{l}
\mathbf{if}\;x + \frac{\left(y - x\right) \cdot z}{t} = -\infty:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{t}, x\right)\\
\mathbf{elif}\;x + \frac{\left(y - x\right) \cdot z}{t} \le 9.290457324428158966196112221687067192256 \cdot 10^{286}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t} + x\\
\end{array}double f(double x, double y, double z, double t) {
double r324011 = x;
double r324012 = y;
double r324013 = r324012 - r324011;
double r324014 = z;
double r324015 = r324013 * r324014;
double r324016 = t;
double r324017 = r324015 / r324016;
double r324018 = r324011 + r324017;
return r324018;
}
double f(double x, double y, double z, double t) {
double r324019 = x;
double r324020 = y;
double r324021 = r324020 - r324019;
double r324022 = z;
double r324023 = r324021 * r324022;
double r324024 = t;
double r324025 = r324023 / r324024;
double r324026 = r324019 + r324025;
double r324027 = -inf.0;
bool r324028 = r324026 <= r324027;
double r324029 = r324021 / r324024;
double r324030 = fma(r324022, r324029, r324019);
double r324031 = 9.290457324428159e+286;
bool r324032 = r324026 <= r324031;
double r324033 = r324022 / r324024;
double r324034 = r324021 * r324033;
double r324035 = r324034 + r324019;
double r324036 = r324032 ? r324026 : r324035;
double r324037 = r324028 ? r324030 : r324036;
return r324037;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
| Original | 6.3 |
|---|---|
| Target | 2.0 |
| Herbie | 0.7 |
if (+ x (/ (* (- y x) z) t)) < -inf.0Initial program 64.0
Simplified0.2
rmApplied div-inv0.3
Taylor expanded around 0 64.0
Simplified0.2
if -inf.0 < (+ x (/ (* (- y x) z) t)) < 9.290457324428159e+286Initial program 0.7
if 9.290457324428159e+286 < (+ x (/ (* (- y x) z) t)) Initial program 44.5
Simplified7.6
rmApplied div-inv7.7
rmApplied fma-udef7.7
Simplified1.4
Final simplification0.7
herbie shell --seed 2019306 +o rules:numerics
(FPCore (x y z t)
:name "Numeric.Histogram:binBounds from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< x -9.0255111955330046e-135) (- x (* (/ z t) (- x y))) (if (< x 4.2750321637007147e-250) (+ x (* (/ (- y x) t) z)) (+ x (/ (- y x) (/ t z)))))
(+ x (/ (* (- y x) z) t)))