\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;t \le -1.20924086246930474 \cdot 10^{-120} \lor \neg \left(t \le -3.1972000332428539 \cdot 10^{-226} \lor \neg \left(t \le 4.78914985574116521 \cdot 10^{-286} \lor \neg \left(t \le 4.146211365397844 \cdot 10^{222}\right)\right)\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 ((double) (((double) (((double) (x * y)) - ((double) (z * y)))) * t));
}
double code(double x, double y, double z, double t) {
double VAR;
if (((t <= -1.2092408624693047e-120) || !((t <= -3.197200033242854e-226) || !((t <= 4.789149855741165e-286) || !(t <= 4.146211365397844e+222))))) {
VAR = ((double) (((double) (t * y)) * ((double) (x - z))));
} 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.3 |
|---|---|
| Target | 3.1 |
| Herbie | 7.1 |
if t < -1.2092408624693047e-120 or -3.197200033242854e-226 < t < 4.789149855741165e-286 or 4.146211365397844e+222 < t Initial program 6.9
Simplified6.9
rmApplied associate-*r*6.4
if -1.2092408624693047e-120 < t < -3.197200033242854e-226 or 4.789149855741165e-286 < t < 4.146211365397844e+222Initial program 7.7
Simplified7.7
Final simplification7.1
herbie shell --seed 2020129
(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))