x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z - t\right)}{a - t} = -inf.0:\\
\;\;\;\;x + \frac{1}{\frac{\frac{a - t}{z - t}}{y}}\\
\mathbf{elif}\;\frac{y \cdot \left(z - t\right)}{a - t} \le 1.47224868860703297 \cdot 10^{169}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (x + (((double) (y * ((double) (z - t)))) / ((double) (a - t)))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((((double) (y * ((double) (z - t)))) / ((double) (a - t))) <= -inf.0)) {
VAR = ((double) (x + (1.0 / ((((double) (a - t)) / ((double) (z - t))) / y))));
} else {
double VAR_1;
if (((((double) (y * ((double) (z - t)))) / ((double) (a - t))) <= 1.472248688607033e+169)) {
VAR_1 = ((double) (x + (((double) (y * ((double) (z - t)))) / ((double) (a - t)))));
} else {
VAR_1 = ((double) (x + ((double) (y * (((double) (z - t)) / ((double) (a - t)))))));
}
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 | 11.1 |
|---|---|
| Target | 1.3 |
| Herbie | 0.5 |
if (/ (* y (- z t)) (- a t)) < -inf.0Initial program 64.0
rmApplied associate-/l*0.1
rmApplied clear-num0.2
if -inf.0 < (/ (* y (- z t)) (- a t)) < 1.47224868860703297e169Initial program 0.2
if 1.47224868860703297e169 < (/ (* y (- z t)) (- a t)) Initial program 43.3
rmApplied *-un-lft-identity43.3
Applied times-frac2.5
Simplified2.5
Final simplification0.5
herbie shell --seed 2020182
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))