x + \left(y - x\right) \cdot \frac{z}{t}\begin{array}{l}
\mathbf{if}\;x \le -2.08446208910259936 \cdot 10^{-124} \lor \neg \left(x \le 1.1914003718802801 \cdot 10^{-199}\right):\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z \cdot y}{t} - \frac{x \cdot z}{t}\right)\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (x + ((double) (((double) (y - x)) * ((double) (z / t))))));
}
double code(double x, double y, double z, double t) {
double VAR;
if (((x <= -2.0844620891025994e-124) || !(x <= 1.19140037188028e-199))) {
VAR = ((double) (x + ((double) (((double) (y - x)) * ((double) (z / t))))));
} else {
VAR = ((double) (x + ((double) (((double) (((double) (z * y)) / t)) - ((double) (((double) (x * z)) / t))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.2 |
|---|---|
| Target | 2.3 |
| Herbie | 2.0 |
if x < -2.0844620891025994e-124 or 1.19140037188028e-199 < x Initial program 1.1
if -2.0844620891025994e-124 < x < 1.19140037188028e-199Initial program 5.2
rmApplied add-cube-cbrt5.9
Applied *-un-lft-identity5.9
Applied times-frac6.0
Applied associate-*r*4.8
Simplified4.7
Taylor expanded around 0 4.5
Final simplification2.0
herbie shell --seed 2020130
(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.8867) (+ 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))))