\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 \le -3.3572243601805693 \cdot 10^{-45}:\\
\;\;\;\;\left(x - z\right) \cdot \left(t \cdot y\right)\\
\mathbf{elif}\;\left(x \cdot y - z \cdot y\right) \cdot t \le -0.0:\\
\;\;\;\;\left(\left(x - z\right) \cdot t\right) \cdot y\\
\mathbf{elif}\;\left(x \cdot y - z \cdot y\right) \cdot t \le 3.6377079460646548 \cdot 10^{+283}:\\
\;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(x - z\right) \cdot \left(t \cdot y\right)\\
\end{array}double f(double x, double y, double z, double t) {
double r28869789 = x;
double r28869790 = y;
double r28869791 = r28869789 * r28869790;
double r28869792 = z;
double r28869793 = r28869792 * r28869790;
double r28869794 = r28869791 - r28869793;
double r28869795 = t;
double r28869796 = r28869794 * r28869795;
return r28869796;
}
double f(double x, double y, double z, double t) {
double r28869797 = x;
double r28869798 = y;
double r28869799 = r28869797 * r28869798;
double r28869800 = z;
double r28869801 = r28869800 * r28869798;
double r28869802 = r28869799 - r28869801;
double r28869803 = t;
double r28869804 = r28869802 * r28869803;
double r28869805 = -3.3572243601805693e-45;
bool r28869806 = r28869804 <= r28869805;
double r28869807 = r28869797 - r28869800;
double r28869808 = r28869803 * r28869798;
double r28869809 = r28869807 * r28869808;
double r28869810 = -0.0;
bool r28869811 = r28869804 <= r28869810;
double r28869812 = r28869807 * r28869803;
double r28869813 = r28869812 * r28869798;
double r28869814 = 3.6377079460646548e+283;
bool r28869815 = r28869804 <= r28869814;
double r28869816 = r28869815 ? r28869804 : r28869809;
double r28869817 = r28869811 ? r28869813 : r28869816;
double r28869818 = r28869806 ? r28869809 : r28869817;
return r28869818;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.7 |
|---|---|
| Target | 3.0 |
| Herbie | 1.5 |
if (* (- (* x y) (* z y)) t) < -3.3572243601805693e-45 or 3.6377079460646548e+283 < (* (- (* x y) (* z y)) t) Initial program 15.7
Simplified2.1
if -3.3572243601805693e-45 < (* (- (* x y) (* z y)) t) < -0.0Initial program 4.5
Simplified9.9
rmApplied associate-*r*2.5
if -0.0 < (* (- (* x y) (* z y)) t) < 3.6377079460646548e+283Initial program 0.4
Final simplification1.5
herbie shell --seed 2019163 +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))