\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y = -\infty:\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{elif}\;x \cdot y - z \cdot y \le -2.41091681955240326 \cdot 10^{-169}:\\
\;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\
\mathbf{elif}\;x \cdot y - z \cdot y \le 1.57213515336389091 \cdot 10^{-137}:\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{elif}\;x \cdot y - z \cdot y \le 8.5531620007048656 \cdot 10^{260}:\\
\;\;\;\;\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)) <= -inf.0)) {
VAR = (y * ((x - z) * t));
} else {
double VAR_1;
if ((((x * y) - (z * y)) <= -2.4109168195524033e-169)) {
VAR_1 = (((x * y) - (z * y)) * t);
} else {
double VAR_2;
if ((((x * y) - (z * y)) <= 1.572135153363891e-137)) {
VAR_2 = (y * ((x - z) * t));
} else {
double VAR_3;
if ((((x * y) - (z * y)) <= 8.553162000704866e+260)) {
VAR_3 = (((x * y) - (z * y)) * t);
} else {
VAR_3 = ((t * y) * (x - z));
}
VAR_2 = VAR_3;
}
VAR_1 = VAR_2;
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.0 |
|---|---|
| Target | 3.2 |
| Herbie | 0.6 |
if (- (* x y) (* z y)) < -inf.0 or -2.4109168195524033e-169 < (- (* x y) (* z y)) < 1.572135153363891e-137Initial program 17.2
rmApplied distribute-rgt-out--17.2
Applied associate-*l*1.7
if -inf.0 < (- (* x y) (* z y)) < -2.4109168195524033e-169 or 1.572135153363891e-137 < (- (* x y) (* z y)) < 8.553162000704866e+260Initial program 0.3
if 8.553162000704866e+260 < (- (* x y) (* z y)) Initial program 44.1
rmApplied add-cube-cbrt44.4
Applied associate-*l*44.4
Taylor expanded around inf 44.1
Simplified0.2
Final simplification0.6
herbie shell --seed 2020103
(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))