\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y = -\infty \lor \neg \left(x \cdot y - z \cdot y \le -2.45676478580699958 \cdot 10^{-247} \lor \neg \left(x \cdot y - z \cdot y \le 1.88712653588383372 \cdot 10^{-270}\right) \land x \cdot y - z \cdot y \le 2.09756000476907307 \cdot 10^{298}\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 r554770 = x;
double r554771 = y;
double r554772 = r554770 * r554771;
double r554773 = z;
double r554774 = r554773 * r554771;
double r554775 = r554772 - r554774;
double r554776 = t;
double r554777 = r554775 * r554776;
return r554777;
}
double f(double x, double y, double z, double t) {
double r554778 = x;
double r554779 = y;
double r554780 = r554778 * r554779;
double r554781 = z;
double r554782 = r554781 * r554779;
double r554783 = r554780 - r554782;
double r554784 = -inf.0;
bool r554785 = r554783 <= r554784;
double r554786 = -2.4567647858069996e-247;
bool r554787 = r554783 <= r554786;
double r554788 = 1.8871265358838337e-270;
bool r554789 = r554783 <= r554788;
double r554790 = !r554789;
double r554791 = 2.097560004769073e+298;
bool r554792 = r554783 <= r554791;
bool r554793 = r554790 && r554792;
bool r554794 = r554787 || r554793;
double r554795 = !r554794;
bool r554796 = r554785 || r554795;
double r554797 = r554778 - r554781;
double r554798 = t;
double r554799 = r554797 * r554798;
double r554800 = r554779 * r554799;
double r554801 = r554783 * r554798;
double r554802 = r554796 ? r554800 : r554801;
return r554802;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.8 |
|---|---|
| Target | 3.0 |
| Herbie | 0.3 |
if (- (* x y) (* z y)) < -inf.0 or -2.4567647858069996e-247 < (- (* x y) (* z y)) < 1.8871265358838337e-270 or 2.097560004769073e+298 < (- (* x y) (* z y)) Initial program 38.1
rmApplied distribute-rgt-out--38.1
Applied associate-*l*0.3
if -inf.0 < (- (* x y) (* z y)) < -2.4567647858069996e-247 or 1.8871265358838337e-270 < (- (* x y) (* z y)) < 2.097560004769073e+298Initial program 0.2
Final simplification0.3
herbie shell --seed 2020046 +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))