\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 9.43843652885612725 \cdot 10^{196}\right):\\
\;\;\;\;1 \cdot \left(\left(t \cdot y\right) \cdot \left(x - z\right)\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 r531741 = x;
double r531742 = y;
double r531743 = r531741 * r531742;
double r531744 = z;
double r531745 = r531744 * r531742;
double r531746 = r531743 - r531745;
double r531747 = t;
double r531748 = r531746 * r531747;
return r531748;
}
double f(double x, double y, double z, double t) {
double r531749 = x;
double r531750 = y;
double r531751 = r531749 * r531750;
double r531752 = z;
double r531753 = r531752 * r531750;
double r531754 = r531751 - r531753;
double r531755 = -inf.0;
bool r531756 = r531754 <= r531755;
double r531757 = 9.438436528856127e+196;
bool r531758 = r531754 <= r531757;
double r531759 = !r531758;
bool r531760 = r531756 || r531759;
double r531761 = 1.0;
double r531762 = t;
double r531763 = r531762 * r531750;
double r531764 = r531749 - r531752;
double r531765 = r531763 * r531764;
double r531766 = r531761 * r531765;
double r531767 = r531754 * r531762;
double r531768 = r531760 ? r531766 : r531767;
return r531768;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.3 |
|---|---|
| Target | 3.3 |
| Herbie | 1.4 |
if (- (* x y) (* z y)) < -inf.0 or 9.438436528856127e+196 < (- (* x y) (* z y)) Initial program 39.0
rmApplied *-un-lft-identity39.0
Applied associate-*l*39.0
Simplified0.7
if -inf.0 < (- (* x y) (* z y)) < 9.438436528856127e+196Initial program 1.5
Final simplification1.4
herbie shell --seed 2020089 +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))