x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;x + \frac{y \cdot \left(z - t\right)}{a - t} = -inf.0 \lor \neg \left(x + \frac{y \cdot \left(z - t\right)}{a - t} \le -1.866487279816731 \cdot 10^{-197}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\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) (((double) (y * ((double) (z - t)))) / ((double) (a - t))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((((double) (x + ((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t)))))) <= -inf.0) || !(((double) (x + ((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t)))))) <= -1.8664872798167307e-197))) {
VAR = ((double) (x + ((double) (y * ((double) (((double) (z - t)) / ((double) (a - t))))))));
} else {
VAR = ((double) (x + ((double) (((double) (y * ((double) (z - t)))) * ((double) (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 | 10.6 |
|---|---|
| Target | 1.2 |
| Herbie | 0.7 |
if (+ x (/ (* y (- z t)) (- a t))) < -inf.0 or -1.866487279816731e-197 < (+ x (/ (* y (- z t)) (- a t))) Initial program 17.8
Simplified1.1
if -inf.0 < (+ x (/ (* y (- z t)) (- a t))) < -1.866487279816731e-197Initial program 0.1
Simplified1.7
rmApplied div-inv1.7
Applied associate-*r*0.2
Final simplification0.7
herbie shell --seed 2020181
(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))))