\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;y \le -4.049647329143563 \cdot 10^{27} \lor \neg \left(y \le 1.1333992022375297 \cdot 10^{48}\right):\\
\;\;\;\;\left(t \cdot y\right) \cdot \left(x - z\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(x - z\right)\right)\\
\end{array}double code(double x, double y, double z, double t) {
return (((x * y) - (z * y)) * t);
}
double code(double x, double y, double z, double t) {
double temp;
if (((y <= -4.049647329143563e+27) || !(y <= 1.1333992022375297e+48))) {
temp = ((t * y) * (x - z));
} else {
temp = (t * (y * (x - z)));
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.9 |
|---|---|
| Target | 2.9 |
| Herbie | 3.0 |
if y < -4.049647329143563e+27 or 1.1333992022375297e+48 < y Initial program 17.2
Simplified17.2
rmApplied associate-*r*4.4
if -4.049647329143563e+27 < y < 1.1333992022375297e+48Initial program 2.3
Simplified2.3
rmApplied associate-*r*7.5
rmApplied associate-*l*2.3
Final simplification3.0
herbie shell --seed 2020057
(FPCore (x y z t)
:name "Linear.Projection:inverseInfinitePerspective from linear-1.19.1.3"
:precision binary64
:herbie-target
(if (< t -9.231879582886777e-80) (* (* y t) (- x z)) (if (< t 2.543067051564877e+83) (* y (* t (- x z))) (* (* y (- x z)) t)))
(* (- (* x y) (* z y)) t))