\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 \lor \neg \left(\left(x \cdot y - z \cdot y\right) \cdot t \le -1.5183126872605908 \cdot 10^{-155} \lor \neg \left(\left(x \cdot y - z \cdot y\right) \cdot t \le 5.5589845878545276 \cdot 10^{51} \lor \neg \left(\left(x \cdot y - z \cdot y\right) \cdot t \le 1.0975945066549479 \cdot 10^{307}\right)\right)\right):\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\
\end{array}double f(double x, double y, double z, double t) {
double r2901 = x;
double r2902 = y;
double r2903 = r2901 * r2902;
double r2904 = z;
double r2905 = r2904 * r2902;
double r2906 = r2903 - r2905;
double r2907 = t;
double r2908 = r2906 * r2907;
return r2908;
}
double f(double x, double y, double z, double t) {
double r2909 = x;
double r2910 = y;
double r2911 = r2909 * r2910;
double r2912 = z;
double r2913 = r2912 * r2910;
double r2914 = r2911 - r2913;
double r2915 = t;
double r2916 = r2914 * r2915;
double r2917 = -inf.0;
bool r2918 = r2916 <= r2917;
double r2919 = -1.5183126872605908e-155;
bool r2920 = r2916 <= r2919;
double r2921 = 5.5589845878545276e+51;
bool r2922 = r2916 <= r2921;
double r2923 = 1.0975945066549479e+307;
bool r2924 = r2916 <= r2923;
double r2925 = !r2924;
bool r2926 = r2922 || r2925;
double r2927 = !r2926;
bool r2928 = r2920 || r2927;
double r2929 = !r2928;
bool r2930 = r2918 || r2929;
double r2931 = r2909 - r2912;
double r2932 = r2931 * r2915;
double r2933 = r2910 * r2932;
double r2934 = r2930 ? r2933 : r2916;
return r2934;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.7 |
|---|---|
| Target | 3.0 |
| Herbie | 1.3 |
if (* (- (* x y) (* z y)) t) < -inf.0 or -1.5183126872605908e-155 < (* (- (* x y) (* z y)) t) < 5.5589845878545276e+51 or 1.0975945066549479e+307 < (* (- (* x y) (* z y)) t) Initial program 15.0
rmApplied distribute-rgt-out--15.0
Applied associate-*l*2.3
if -inf.0 < (* (- (* x y) (* z y)) t) < -1.5183126872605908e-155 or 5.5589845878545276e+51 < (* (- (* x y) (* z y)) t) < 1.0975945066549479e+307Initial program 0.3
Final simplification1.3
herbie shell --seed 2020025
(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))