\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;y \le -2.79246645941082474 \cdot 10^{66} \lor \neg \left(y \le 5593.7482683519529\right):\\
\;\;\;\;\left(y \cdot t\right) \cdot {\left(x - z\right)}^{1}\\
\mathbf{else}:\\
\;\;\;\;t \cdot {\left(y \cdot \left(x - z\right)\right)}^{1}\\
\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 temp;
if (((y <= -2.7924664594108247e+66) || !(y <= 5593.748268351953))) {
temp = ((y * t) * pow((x - z), 1.0));
} else {
temp = (t * pow((y * (x - z)), 1.0));
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.2 |
|---|---|
| Target | 3.0 |
| Herbie | 2.8 |
if y < -2.7924664594108247e+66 or 5593.748268351953 < y Initial program 17.4
Simplified17.4
rmApplied pow117.4
Applied pow117.4
Applied pow-prod-down17.4
rmApplied unpow-prod-down17.4
Applied associate-*r*3.7
Simplified3.7
if -2.7924664594108247e+66 < y < 5593.748268351953Initial program 2.4
Simplified2.4
rmApplied pow12.4
Applied pow12.4
Applied pow-prod-down2.4
Final simplification2.8
herbie shell --seed 2020053
(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))