\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 \le -3.3572243601805693 \cdot 10^{-45}:\\
\;\;\;\;\left(x - z\right) \cdot \left(t \cdot y\right)\\
\mathbf{elif}\;\left(x \cdot y - z \cdot y\right) \cdot t \le -0.0:\\
\;\;\;\;\left(\left(x - z\right) \cdot t\right) \cdot y\\
\mathbf{elif}\;\left(x \cdot y - z \cdot y\right) \cdot t \le 3.6377079460646548 \cdot 10^{+283}:\\
\;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x - z\right) \cdot t\right) \cdot y\\
\end{array}double f(double x, double y, double z, double t) {
double r12121913 = x;
double r12121914 = y;
double r12121915 = r12121913 * r12121914;
double r12121916 = z;
double r12121917 = r12121916 * r12121914;
double r12121918 = r12121915 - r12121917;
double r12121919 = t;
double r12121920 = r12121918 * r12121919;
return r12121920;
}
double f(double x, double y, double z, double t) {
double r12121921 = x;
double r12121922 = y;
double r12121923 = r12121921 * r12121922;
double r12121924 = z;
double r12121925 = r12121924 * r12121922;
double r12121926 = r12121923 - r12121925;
double r12121927 = t;
double r12121928 = r12121926 * r12121927;
double r12121929 = -3.3572243601805693e-45;
bool r12121930 = r12121928 <= r12121929;
double r12121931 = r12121921 - r12121924;
double r12121932 = r12121927 * r12121922;
double r12121933 = r12121931 * r12121932;
double r12121934 = -0.0;
bool r12121935 = r12121928 <= r12121934;
double r12121936 = r12121931 * r12121927;
double r12121937 = r12121936 * r12121922;
double r12121938 = 3.6377079460646548e+283;
bool r12121939 = r12121928 <= r12121938;
double r12121940 = r12121939 ? r12121928 : r12121937;
double r12121941 = r12121935 ? r12121937 : r12121940;
double r12121942 = r12121930 ? r12121933 : r12121941;
return r12121942;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.7 |
|---|---|
| Target | 3.0 |
| Herbie | 1.7 |
if (* (- (* x y) (* z y)) t) < -3.3572243601805693e-45Initial program 8.9
Simplified2.0
if -3.3572243601805693e-45 < (* (- (* x y) (* z y)) t) < -0.0 or 3.6377079460646548e+283 < (* (- (* x y) (* z y)) t) Initial program 12.3
Simplified8.5
rmApplied associate-*r*3.0
if -0.0 < (* (- (* x y) (* z y)) t) < 3.6377079460646548e+283Initial program 0.4
Final simplification1.7
herbie shell --seed 2019163 +o rules:numerics
(FPCore (x y z t)
:name "Linear.Projection:inverseInfinitePerspective from linear-1.19.1.3"
: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))