x + y \cdot \frac{z - t}{z - a}\begin{array}{l}
\mathbf{if}\;y \cdot \frac{z - t}{z - a} \le 1.70874597868709309 \cdot 10^{307}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\left(z - t\right) \cdot y\right) \cdot \frac{1}{z - a}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (y * (((double) (z - t)) / ((double) (z - a)))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if ((((double) (y * (((double) (z - t)) / ((double) (z - a))))) <= 1.708745978687093e+307)) {
VAR = ((double) (x + ((double) (y * (((double) (z - t)) / ((double) (z - a)))))));
} else {
VAR = ((double) (x + ((double) (((double) (((double) (z - t)) * y)) * (1.0 / ((double) (z - a)))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 1.5 |
|---|---|
| Target | 1.4 |
| Herbie | 0.9 |
if (* y (/ (- z t) (- z a))) < 1.70874597868709309e307Initial program 0.9
if 1.70874597868709309e307 < (* y (/ (- z t) (- z a))) Initial program 61.0
rmApplied div-inv61.0
Applied associate-*r*2.6
Simplified2.6
Final simplification0.9
herbie shell --seed 2020182
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))