x + \left(y - x\right) \cdot \frac{z}{t}\begin{array}{l}
\mathbf{if}\;x \le -1.370918042146381127285332195867531032316 \cdot 10^{-76} \lor \neg \left(x \le 1.78843006131791689904510956091429861366 \cdot 10^{49}\right):\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\
\end{array}double f(double x, double y, double z, double t) {
double r741639 = x;
double r741640 = y;
double r741641 = r741640 - r741639;
double r741642 = z;
double r741643 = t;
double r741644 = r741642 / r741643;
double r741645 = r741641 * r741644;
double r741646 = r741639 + r741645;
return r741646;
}
double f(double x, double y, double z, double t) {
double r741647 = x;
double r741648 = -1.3709180421463811e-76;
bool r741649 = r741647 <= r741648;
double r741650 = 1.788430061317917e+49;
bool r741651 = r741647 <= r741650;
double r741652 = !r741651;
bool r741653 = r741649 || r741652;
double r741654 = y;
double r741655 = r741654 - r741647;
double r741656 = z;
double r741657 = t;
double r741658 = r741656 / r741657;
double r741659 = r741655 * r741658;
double r741660 = r741647 + r741659;
double r741661 = r741655 * r741656;
double r741662 = r741661 / r741657;
double r741663 = r741647 + r741662;
double r741664 = r741653 ? r741660 : r741663;
return r741664;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.0 |
|---|---|
| Target | 2.2 |
| Herbie | 2.4 |
if x < -1.3709180421463811e-76 or 1.788430061317917e+49 < x Initial program 0.2
if -1.3709180421463811e-76 < x < 1.788430061317917e+49Initial program 3.6
rmApplied add-cube-cbrt4.3
Applied *-un-lft-identity4.3
Applied times-frac4.3
Applied associate-*r*3.8
Simplified3.8
rmApplied frac-times5.1
Simplified4.4
Final simplification2.4
herbie shell --seed 2019362
(FPCore (x y z t)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:tickPosition from plot-0.2.3.4"
:precision binary64
:herbie-target
(if (< (* (- y x) (/ z t)) -1013646692435.887) (+ x (/ (- y x) (/ t z))) (if (< (* (- y x) (/ z t)) -0.0) (+ x (/ (* (- y x) z) t)) (+ x (/ (- y x) (/ t z)))))
(+ x (* (- y x) (/ z t))))