\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y \le -5.3674001281639158 \cdot 10^{214}:\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{elif}\;x \cdot y - z \cdot y \le 6.42449616954347382 \cdot 10^{211}:\\
\;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot y\right) \cdot \left(x - z\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 VAR;
if ((((x * y) - (z * y)) <= -5.367400128163916e+214)) {
VAR = (y * ((x - z) * t));
} else {
double VAR_1;
if ((((x * y) - (z * y)) <= 6.424496169543474e+211)) {
VAR_1 = (((x * y) - (z * y)) * t);
} else {
VAR_1 = ((t * y) * (x - z));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.9 |
|---|---|
| Target | 3.2 |
| Herbie | 1.4 |
if (- (* x y) (* z y)) < -5.367400128163916e+214Initial program 30.3
rmApplied distribute-rgt-out--30.3
Applied associate-*l*1.2
if -5.367400128163916e+214 < (- (* x y) (* z y)) < 6.424496169543474e+211Initial program 1.5
if 6.424496169543474e+211 < (- (* x y) (* z y)) Initial program 31.0
rmApplied add-cube-cbrt31.6
Applied associate-*l*31.6
Taylor expanded around inf 31.0
Simplified0.9
Final simplification1.4
herbie shell --seed 2020091
(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))