\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 -2.07332382151466336 \cdot 10^{-64} \lor \neg \left(\left(x \cdot y - z \cdot y\right) \cdot t \le 8.07797671743811923 \cdot 10^{-51}\right):\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(x - z\right)\\
\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 r552826 = x;
double r552827 = y;
double r552828 = r552826 * r552827;
double r552829 = z;
double r552830 = r552829 * r552827;
double r552831 = r552828 - r552830;
double r552832 = t;
double r552833 = r552831 * r552832;
return r552833;
}
double f(double x, double y, double z, double t) {
double r552834 = x;
double r552835 = y;
double r552836 = r552834 * r552835;
double r552837 = z;
double r552838 = r552837 * r552835;
double r552839 = r552836 - r552838;
double r552840 = t;
double r552841 = r552839 * r552840;
double r552842 = -2.0733238215146634e-64;
bool r552843 = r552841 <= r552842;
double r552844 = 8.077976717438119e-51;
bool r552845 = r552841 <= r552844;
double r552846 = !r552845;
bool r552847 = r552843 || r552846;
double r552848 = r552835 * r552840;
double r552849 = r552834 - r552837;
double r552850 = r552848 * r552849;
double r552851 = r552849 * r552840;
double r552852 = r552835 * r552851;
double r552853 = r552847 ? r552850 : r552852;
return r552853;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.0 |
|---|---|
| Target | 3.0 |
| Herbie | 2.7 |
if (* (- (* x y) (* z y)) t) < -2.0733238215146634e-64 or 8.077976717438119e-51 < (* (- (* x y) (* z y)) t) Initial program 9.6
rmApplied distribute-rgt-out--9.6
Applied associate-*l*10.5
rmApplied add-cube-cbrt11.4
Applied associate-*l*11.4
rmApplied add-cube-cbrt11.7
Applied associate-*l*11.7
Simplified7.3
rmApplied associate-*r*3.8
Simplified2.8
if -2.0733238215146634e-64 < (* (- (* x y) (* z y)) t) < 8.077976717438119e-51Initial program 2.9
rmApplied distribute-rgt-out--2.9
Applied associate-*l*2.5
Final simplification2.7
herbie shell --seed 2020039
(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))