x + \frac{y \cdot \left(z - t\right)}{z - a}\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z - t\right)}{z - a} \leq -\infty \lor \neg \left(\frac{y \cdot \left(z - t\right)}{z - a} \leq 3.6567254005584506 \cdot 10^{+302}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{z - a} + x\\
\end{array}(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
(FPCore (x y z t a)
:precision binary64
(if (or (<= (/ (* y (- z t)) (- z a)) (- INFINITY))
(not (<= (/ (* y (- z t)) (- z a)) 3.6567254005584506e+302)))
(+ x (* y (/ (- z t) (- z a))))
(+ (/ (* y (- z t)) (- z a)) x)))double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((((y * (z - t)) / (z - a)) <= -((double) INFINITY)) || !(((y * (z - t)) / (z - a)) <= 3.6567254005584506e+302)) {
tmp = x + (y * ((z - t) / (z - a)));
} else {
tmp = ((y * (z - t)) / (z - a)) + x;
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.9 |
|---|---|
| Target | 1.3 |
| Herbie | 0.3 |
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 3.6567254005584506e302 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 63.6
rmApplied *-un-lft-identity_binary6463.6
Applied times-frac_binary640.1
Simplified0.1
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 3.6567254005584506e302Initial program 0.3
Final simplification0.3
herbie shell --seed 2020260
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))