\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y \le -1.56904536481920755 \cdot 10^{266} \lor \neg \left(x \cdot y - z \cdot y \le -4.3421162850491718 \cdot 10^{-160} \lor \neg \left(x \cdot y - z \cdot y \le 0.0 \lor \neg \left(x \cdot y - z \cdot y \le 6.3309524030663589 \cdot 10^{173}\right)\right)\right):\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\
\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 (((((double) (((double) (x * y)) - ((double) (z * y)))) <= -1.5690453648192076e+266) || !((((double) (((double) (x * y)) - ((double) (z * y)))) <= -4.342116285049172e-160) || !((((double) (((double) (x * y)) - ((double) (z * y)))) <= 0.0) || !(((double) (((double) (x * y)) - ((double) (z * y)))) <= 6.330952403066359e+173))))) {
VAR = ((double) (y * ((double) (((double) (x - z)) * t))));
} else {
VAR = ((double) (((double) (((double) (x * y)) - ((double) (z * y)))) * t));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.2 |
|---|---|
| Target | 2.9 |
| Herbie | 0.6 |
if (- (* x y) (* z y)) < -1.56904536481920755e266 or -4.3421162850491718e-160 < (- (* x y) (* z y)) < 0.0 or 6.3309524030663589e173 < (- (* x y) (* z y)) Initial program 22.8
rmApplied distribute-rgt-out--22.8
Applied associate-*l*1.2
if -1.56904536481920755e266 < (- (* x y) (* z y)) < -4.3421162850491718e-160 or 0.0 < (- (* x y) (* z y)) < 6.3309524030663589e173Initial program 0.4
Final simplification0.6
herbie shell --seed 2020149
(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))