\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):\\
\;\;\;\;\mathsf{fma}\left(x, y, -y \cdot z\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 r528053 = x;
double r528054 = y;
double r528055 = r528053 * r528054;
double r528056 = z;
double r528057 = r528056 * r528054;
double r528058 = r528055 - r528057;
double r528059 = t;
double r528060 = r528058 * r528059;
return r528060;
}
double f(double x, double y, double z, double t) {
double r528061 = t;
double r528062 = -6.615416921974751e-26;
bool r528063 = r528061 <= r528062;
double r528064 = 752007501190631.0;
bool r528065 = r528061 <= r528064;
double r528066 = !r528065;
bool r528067 = r528063 || r528066;
double r528068 = x;
double r528069 = y;
double r528070 = z;
double r528071 = r528069 * r528070;
double r528072 = -r528071;
double r528073 = fma(r528068, r528069, r528072);
double r528074 = r528073 * r528061;
double r528075 = r528068 - r528070;
double r528076 = r528075 * r528061;
double r528077 = r528069 * r528076;
double r528078 = r528067 ? r528074 : r528077;
return r528078;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
| Original | 6.8 |
|---|---|
| Target | 3.0 |
| Herbie | 2.6 |
if t < -6.615416921974751e-26 or 752007501190631.0 < t Initial program 3.3
rmApplied fma-neg3.3
Simplified3.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 +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))