\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;\left(x \cdot y - z \cdot y\right) \cdot t = -\infty:\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{elif}\;\left(x \cdot y - z \cdot y\right) \cdot t \le 3607850319905191900:\\
\;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(t \cdot y\right) \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 (((((x * y) - (z * y)) * t) <= -inf.0)) {
temp = (y * ((x - z) * t));
} else {
double temp_1;
if (((((x * y) - (z * y)) * t) <= 3.607850319905192e+18)) {
temp_1 = (((x * y) - (z * y)) * t);
} else {
temp_1 = pow(((t * y) * (x - z)), 1.0);
}
temp = temp_1;
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.0 |
|---|---|
| Target | 3.0 |
| Herbie | 1.9 |
if (* (- (* x y) (* z y)) t) < -inf.0Initial program 64.0
rmApplied distribute-rgt-out--64.0
Applied associate-*l*0.3
if -inf.0 < (* (- (* x y) (* z y)) t) < 3.607850319905192e+18Initial program 1.8
if 3.607850319905192e+18 < (* (- (* x y) (* z y)) t) Initial program 12.5
rmApplied pow112.5
Applied pow112.5
Applied pow-prod-down12.5
Simplified2.3
Final simplification1.9
herbie shell --seed 2020049 +o rules:numerics
(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))