x + \frac{y \cdot \left(z - t\right)}{z - a}\begin{array}{l}
\mathbf{if}\;y \le -2.3556285618525312 \cdot 10^{-32}:\\
\;\;\;\;x + \frac{y}{z - a} \cdot \left(z - t\right)\\
\mathbf{elif}\;y \le 1.21539727317836126 \cdot 10^{-115}:\\
\;\;\;\;x + \frac{1}{\frac{z - a}{y \cdot \left(z - t\right)}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(\frac{z}{z - a} - \frac{t}{z - a}\right)\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (((double) (y * ((double) (z - t)))) / ((double) (z - a))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if ((y <= -2.3556285618525312e-32)) {
VAR = ((double) (x + ((double) (((double) (y / ((double) (z - a)))) * ((double) (z - t))))));
} else {
double VAR_1;
if ((y <= 1.2153972731783613e-115)) {
VAR_1 = ((double) (x + ((double) (1.0 / ((double) (((double) (z - a)) / ((double) (y * ((double) (z - t))))))))));
} else {
VAR_1 = ((double) (x + ((double) (y * ((double) (((double) (z / ((double) (z - a)))) - ((double) (t / ((double) (z - a))))))))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.1 |
|---|---|
| Target | 1.3 |
| Herbie | 1.1 |
if y < -2.3556285618525312e-32Initial program 20.0
rmApplied *-un-lft-identity20.0
Applied times-frac0.5
Simplified0.5
rmApplied div-sub0.5
rmApplied div-inv0.5
Applied div-inv0.6
Applied distribute-rgt-out--0.6
Applied associate-*r*2.6
Simplified2.5
if -2.3556285618525312e-32 < y < 1.2153972731783613e-115Initial program 0.5
rmApplied clear-num0.5
if 1.2153972731783613e-115 < y Initial program 14.8
rmApplied *-un-lft-identity14.8
Applied times-frac0.8
Simplified0.8
rmApplied div-sub0.8
Final simplification1.1
herbie shell --seed 2020122
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))