\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;t \le -6.6154169219747513 \cdot 10^{-26} \lor \neg \left(t \le 752007501190631\right):\\
\;\;\;\;\left(y \cdot \left(x - z\right)\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\end{array}double f(double x, double y, double z, double t) {
double r645834 = x;
double r645835 = y;
double r645836 = r645834 * r645835;
double r645837 = z;
double r645838 = r645837 * r645835;
double r645839 = r645836 - r645838;
double r645840 = t;
double r645841 = r645839 * r645840;
return r645841;
}
double f(double x, double y, double z, double t) {
double r645842 = t;
double r645843 = -6.615416921974751e-26;
bool r645844 = r645842 <= r645843;
double r645845 = 752007501190631.0;
bool r645846 = r645842 <= r645845;
double r645847 = !r645846;
bool r645848 = r645844 || r645847;
double r645849 = y;
double r645850 = x;
double r645851 = z;
double r645852 = r645850 - r645851;
double r645853 = r645849 * r645852;
double r645854 = r645853 * r645842;
double r645855 = r645852 * r645842;
double r645856 = r645849 * r645855;
double r645857 = r645848 ? r645854 : r645856;
return r645857;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.8 |
|---|---|
| Target | 3.0 |
| Herbie | 2.6 |
if t < -6.615416921974751e-26 or 752007501190631.0 < t Initial program 3.3
rmApplied distribute-rgt-out--3.3
Applied associate-*l*14.6
rmApplied associate-*r*3.3
if -6.615416921974751e-26 < t < 752007501190631.0Initial program 9.1
rmApplied distribute-rgt-out--9.1
Applied associate-*l*2.1
Final simplification2.6
herbie shell --seed 2020045
(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))