\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;y \le -12356067858.1789532 \lor \neg \left(y \le 5.4143114825119403 \cdot 10^{82}\right):\\
\;\;\;\;\left(t \cdot \left(x - z\right)\right) \cdot y\\
\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 ((double) (((double) (((double) (x * y)) - ((double) (z * y)))) * t));
}
double code(double x, double y, double z, double t) {
double VAR;
if (((y <= -12356067858.178953) || !(y <= 5.41431148251194e+82))) {
VAR = ((double) (((double) (t * ((double) (x - z)))) * y));
} else {
VAR = ((double) (t * ((double) (y * ((double) (x - z))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.1 |
|---|---|
| Target | 3.2 |
| Herbie | 2.7 |
if y < -12356067858.178953 or 5.41431148251194e+82 < y Initial program 18.0
Simplified18.0
rmApplied *-commutative18.0
Applied associate-*r*3.6
if -12356067858.178953 < y < 5.41431148251194e+82Initial program 2.3
Simplified2.3
Final simplification2.7
herbie shell --seed 2020114 +o rules:numerics
(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))