x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -3.0238400941313086 \cdot 10^{-142} \lor \neg \left(t \le 1.5459591352588837 \cdot 10^{-258}\right):\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a - t} \cdot \left(z - t\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) (a - t))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((t <= -3.0238400941313086e-142) || !(t <= 1.5459591352588837e-258))) {
VAR = ((double) (x + ((double) (y / ((double) (((double) (a - t)) / ((double) (z - t))))))));
} else {
VAR = ((double) (x + ((double) (((double) (y / ((double) (a - t)))) * ((double) (z - 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.2 |
| Herbie | 1.2 |
if t < -3.0238400941313086e-142 or 1.5459591352588837e-258 < t Initial program 12.6
rmApplied associate-/l*0.8
if -3.0238400941313086e-142 < t < 1.5459591352588837e-258Initial program 3.9
rmApplied associate-/l*3.7
rmApplied associate-/r/3.4
Final simplification1.2
herbie shell --seed 2020168
(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))))