\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;t \le -5.11190814655835692 \cdot 10^{-81} \lor \neg \left(t \le 1.97666788664023624 \cdot 10^{-21}\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 r468672 = x;
double r468673 = y;
double r468674 = r468672 * r468673;
double r468675 = z;
double r468676 = r468675 * r468673;
double r468677 = r468674 - r468676;
double r468678 = t;
double r468679 = r468677 * r468678;
return r468679;
}
double f(double x, double y, double z, double t) {
double r468680 = t;
double r468681 = -5.111908146558357e-81;
bool r468682 = r468680 <= r468681;
double r468683 = 1.9766678866402362e-21;
bool r468684 = r468680 <= r468683;
double r468685 = !r468684;
bool r468686 = r468682 || r468685;
double r468687 = y;
double r468688 = x;
double r468689 = z;
double r468690 = r468688 - r468689;
double r468691 = r468687 * r468690;
double r468692 = r468691 * r468680;
double r468693 = r468690 * r468680;
double r468694 = r468687 * r468693;
double r468695 = r468686 ? r468692 : r468694;
return r468695;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.2 |
|---|---|
| Target | 3.1 |
| Herbie | 2.8 |
if t < -5.111908146558357e-81 or 1.9766678866402362e-21 < t Initial program 3.4
rmApplied *-un-lft-identity3.4
Applied associate-*r*3.4
Simplified3.4
if -5.111908146558357e-81 < t < 1.9766678866402362e-21Initial program 10.7
rmApplied distribute-rgt-out--10.7
Applied associate-*l*2.2
Final simplification2.8
herbie shell --seed 2020035 +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))