x + \frac{\left(y - x\right) \cdot z}{t}\begin{array}{l}
\mathbf{if}\;x + \frac{\left(y - x\right) \cdot z}{t} = -\infty:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\mathbf{elif}\;x + \frac{\left(y - x\right) \cdot z}{t} \le 2.334828876963019126638500573266416450503 \cdot 10^{262}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{t}\\
\end{array}double f(double x, double y, double z, double t) {
double r526371 = x;
double r526372 = y;
double r526373 = r526372 - r526371;
double r526374 = z;
double r526375 = r526373 * r526374;
double r526376 = t;
double r526377 = r526375 / r526376;
double r526378 = r526371 + r526377;
return r526378;
}
double f(double x, double y, double z, double t) {
double r526379 = x;
double r526380 = y;
double r526381 = r526380 - r526379;
double r526382 = z;
double r526383 = r526381 * r526382;
double r526384 = t;
double r526385 = r526383 / r526384;
double r526386 = r526379 + r526385;
double r526387 = -inf.0;
bool r526388 = r526386 <= r526387;
double r526389 = r526384 / r526382;
double r526390 = r526381 / r526389;
double r526391 = r526379 + r526390;
double r526392 = 2.334828876963019e+262;
bool r526393 = r526386 <= r526392;
double r526394 = r526382 / r526384;
double r526395 = r526381 * r526394;
double r526396 = r526379 + r526395;
double r526397 = r526393 ? r526386 : r526396;
double r526398 = r526388 ? r526391 : r526397;
return r526398;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.5 |
|---|---|
| Target | 2.2 |
| Herbie | 1.0 |
if (+ x (/ (* (- y x) z) t)) < -inf.0Initial program 64.0
rmApplied associate-/l*0.2
if -inf.0 < (+ x (/ (* (- y x) z) t)) < 2.334828876963019e+262Initial program 0.7
rmApplied *-un-lft-identity0.7
Applied times-frac2.2
Simplified2.2
rmApplied associate-*r/0.7
if 2.334828876963019e+262 < (+ x (/ (* (- y x) z) t)) Initial program 32.4
rmApplied *-un-lft-identity32.4
Applied times-frac4.0
Simplified4.0
Final simplification1.0
herbie shell --seed 2019353 +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)))