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{y}{a - t} \cdot \left(z - t\right)\\
\mathbf{elif}\;\frac{y \cdot \left(z - t\right)}{a - t} \le 3.50265489255120844 \cdot 10^{266}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{1}{\frac{a - t}{z - t}}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if ((((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t)))) <= -inf.0)) {
VAR = ((double) (x + ((double) (((double) (y / ((double) (a - t)))) * ((double) (z - t))))));
} else {
double VAR_1;
if ((((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t)))) <= 3.5026548925512084e+266)) {
VAR_1 = ((double) (x + ((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t))))));
} else {
VAR_1 = ((double) (x + ((double) (y * ((double) (1.0 / ((double) (((double) (a - t)) / ((double) (z - 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 | 10.8 |
|---|---|
| Target | 1.1 |
| Herbie | 0.3 |
if (/ (* y (- z t)) (- a t)) < -inf.0Initial program 64.0
rmApplied associate-/l*0.1
rmApplied associate-/r/0.1
if -inf.0 < (/ (* y (- z t)) (- a t)) < 3.50265489255120844e266Initial program 0.2
if 3.50265489255120844e266 < (/ (* y (- z t)) (- a t)) Initial program 57.1
rmApplied *-un-lft-identity57.1
Applied times-frac1.0
Simplified1.0
rmApplied clear-num1.1
Final simplification0.3
herbie shell --seed 2020173
(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))))