\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 r676997 = x;
double r676998 = y;
double r676999 = r676997 * r676998;
double r677000 = z;
double r677001 = r677000 * r676998;
double r677002 = r676999 - r677001;
double r677003 = t;
double r677004 = r677002 * r677003;
return r677004;
}
double f(double x, double y, double z, double t) {
double r677005 = x;
double r677006 = y;
double r677007 = r677005 * r677006;
double r677008 = z;
double r677009 = r677008 * r677006;
double r677010 = r677007 - r677009;
double r677011 = -inf.0;
bool r677012 = r677010 <= r677011;
double r677013 = -2.4567647858069996e-247;
bool r677014 = r677010 <= r677013;
double r677015 = 1.8871265358838337e-270;
bool r677016 = r677010 <= r677015;
double r677017 = !r677016;
double r677018 = 2.097560004769073e+298;
bool r677019 = r677010 <= r677018;
bool r677020 = r677017 && r677019;
bool r677021 = r677014 || r677020;
double r677022 = !r677021;
bool r677023 = r677012 || r677022;
double r677024 = r677005 - r677008;
double r677025 = t;
double r677026 = r677024 * r677025;
double r677027 = r677006 * r677026;
double r677028 = r677010 * r677025;
double r677029 = r677023 ? r677027 : r677028;
return r677029;
}




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
(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))