x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;y \leq -3.1531961664318305 \cdot 10^{-188} \lor \neg \left(y \leq 1.2891461822977456 \cdot 10^{-151}\right):\\
\;\;\;\;x + y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{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 (((y <= -3.1531961664318305e-188) || !(y <= 1.2891461822977456e-151))) {
VAR = ((double) (x + ((double) (y * ((double) ((z / ((double) (a - t))) - (t / ((double) (a - t)))))))));
} else {
VAR = ((double) (x + ((double) (((double) (y * ((double) (z - t)))) * (1.0 / ((double) (a - t)))))));
}
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.2 |
|---|---|
| Target | 1.3 |
| Herbie | 0.8 |
if y < -3.1531961664318305e-188 or 1.2891461822977456e-151 < y Initial program 14.7
Simplified0.9
rmApplied div-sub0.9
if -3.1531961664318305e-188 < y < 1.2891461822977456e-151Initial program 0.6
Simplified2.8
rmApplied div-inv2.9
Applied associate-*r*0.6
Final simplification0.8
herbie shell --seed 2020196
(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))))