\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y \le -8.195669489681609678798574875257253827771 \cdot 10^{239}:\\
\;\;\;\;\left(x - z\right) \cdot \left(y \cdot t\right)\\
\mathbf{elif}\;x \cdot y - z \cdot y \le -3.838984261423296633673495406852766881499 \cdot 10^{-245}:\\
\;\;\;\;t \cdot \left(x \cdot y - z \cdot y\right)\\
\mathbf{elif}\;x \cdot y - z \cdot y \le 1.584401045790907446074774340867010475211 \cdot 10^{-151}:\\
\;\;\;\;\left(x - z\right) \cdot \left(y \cdot t\right)\\
\mathbf{elif}\;x \cdot y - z \cdot y \le 8.47804001699789240780003797872227611413 \cdot 10^{211}:\\
\;\;\;\;t \cdot \left(x \cdot y - z \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot \left(x - z\right)\right) \cdot y\\
\end{array}double f(double x, double y, double z, double t) {
double r472903 = x;
double r472904 = y;
double r472905 = r472903 * r472904;
double r472906 = z;
double r472907 = r472906 * r472904;
double r472908 = r472905 - r472907;
double r472909 = t;
double r472910 = r472908 * r472909;
return r472910;
}
double f(double x, double y, double z, double t) {
double r472911 = x;
double r472912 = y;
double r472913 = r472911 * r472912;
double r472914 = z;
double r472915 = r472914 * r472912;
double r472916 = r472913 - r472915;
double r472917 = -8.19566948968161e+239;
bool r472918 = r472916 <= r472917;
double r472919 = r472911 - r472914;
double r472920 = t;
double r472921 = r472912 * r472920;
double r472922 = r472919 * r472921;
double r472923 = -3.838984261423297e-245;
bool r472924 = r472916 <= r472923;
double r472925 = r472920 * r472916;
double r472926 = 1.5844010457909074e-151;
bool r472927 = r472916 <= r472926;
double r472928 = 8.478040016997892e+211;
bool r472929 = r472916 <= r472928;
double r472930 = r472920 * r472919;
double r472931 = r472930 * r472912;
double r472932 = r472929 ? r472925 : r472931;
double r472933 = r472927 ? r472922 : r472932;
double r472934 = r472924 ? r472925 : r472933;
double r472935 = r472918 ? r472922 : r472934;
return r472935;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.9 |
|---|---|
| Target | 3.2 |
| Herbie | 0.4 |
if (- (* x y) (* z y)) < -8.19566948968161e+239 or -3.838984261423297e-245 < (- (* x y) (* z y)) < 1.5844010457909074e-151Initial program 17.9
Simplified0.9
if -8.19566948968161e+239 < (- (* x y) (* z y)) < -3.838984261423297e-245 or 1.5844010457909074e-151 < (- (* x y) (* z y)) < 8.478040016997892e+211Initial program 0.2
if 8.478040016997892e+211 < (- (* x y) (* z y)) Initial program 29.4
rmApplied distribute-rgt-out--29.4
Applied associate-*l*0.9
Simplified0.9
Final simplification0.4
herbie shell --seed 2019194 +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))