x + \frac{\left(y - z\right) \cdot t}{a - z}\begin{array}{l}
\mathbf{if}\;t \leq -5.212099959314552 \cdot 10^{-302}:\\
\;\;\;\;x + t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)\\
\mathbf{elif}\;t \leq 128923762327.44762:\\
\;\;\;\;x + \left(t \cdot \left(y - z\right)\right) \cdot \frac{1}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\
\end{array}(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
(FPCore (x y z t a)
:precision binary64
(if (<= t -5.212099959314552e-302)
(+ x (* t (- (/ y (- a z)) (/ z (- a z)))))
(if (<= t 128923762327.44762)
(+ x (* (* t (- y z)) (/ 1.0 (- a z))))
(+ x (/ (- y z) (/ (- a z) t))))))double code(double x, double y, double z, double t, double a) {
return ((double) (x + (((double) (((double) (y - z)) * t)) / ((double) (a - z)))));
}
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.212099959314552e-302)) {
tmp = ((double) (x + ((double) (t * ((double) ((y / ((double) (a - z))) - (z / ((double) (a - z)))))))));
} else {
double tmp_1;
if ((t <= 128923762327.44762)) {
tmp_1 = ((double) (x + ((double) (((double) (t * ((double) (y - z)))) * (1.0 / ((double) (a - z)))))));
} else {
tmp_1 = ((double) (x + (((double) (y - z)) / (((double) (a - z)) / t))));
}
tmp = tmp_1;
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.8 |
|---|---|
| Target | 0.6 |
| Herbie | 1.2 |
if t < -5.2120999593145522e-302Initial program 10.9
rmApplied add-cube-cbrt_binary6411.2
Applied times-frac_binary641.8
rmApplied pow1_binary641.8
Applied pow1_binary641.8
Applied pow-prod-down_binary641.8
Simplified1.3
rmApplied div-sub_binary641.3
if -5.2120999593145522e-302 < t < 128923762327.447617Initial program 0.4
rmApplied div-inv_binary640.4
if 128923762327.447617 < t Initial program 24.1
rmApplied associate-/l*_binary642.1
Final simplification1.2
herbie shell --seed 2020210
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))
(+ x (/ (* (- y z) t) (- a z))))