\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - y \cdot z \le -3.21770722541850068 \cdot 10^{200} \lor \neg \left(x \cdot y - y \cdot z \le -5.3703905181517181 \cdot 10^{-145} \lor \neg \left(x \cdot y - y \cdot z \le 2.70424997808956203 \cdot 10^{-148}\right) \land x \cdot y - y \cdot z \le 6.534258241714583 \cdot 10^{301}\right):\\
\;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\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 (((((double) (((double) (x * y)) - ((double) (y * z)))) <= -3.217707225418501e+200) || !((((double) (((double) (x * y)) - ((double) (y * z)))) <= -5.370390518151718e-145) || (!(((double) (((double) (x * y)) - ((double) (y * z)))) <= 2.704249978089562e-148) && (((double) (((double) (x * y)) - ((double) (y * z)))) <= 6.534258241714583e+301))))) {
VAR = ((double) (y * ((double) (t * ((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.4 |
|---|---|
| Target | 3.4 |
| Herbie | 0.6 |
if (- (* x y) (* z y)) < -3.21770722541850068e200 or -5.3703905181517181e-145 < (- (* x y) (* z y)) < 2.70424997808956203e-148 or 6.534258241714583e301 < (- (* x y) (* z y)) Initial program 20.5
Simplified1.3
if -3.21770722541850068e200 < (- (* x y) (* z y)) < -5.3703905181517181e-145 or 2.70424997808956203e-148 < (- (* x y) (* z y)) < 6.534258241714583e301Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied associate-*r*0.3
Simplified0.3
Final simplification0.6
herbie shell --seed 2020179
(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))