\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;t \le -7.89855730043848662453832577712094659601 \cdot 10^{102} \lor \neg \left(t \le 1.942514649585053196773819820514152676405 \cdot 10^{-44}\right):\\
\;\;\;\;\mathsf{fma}\left(x, y, z \cdot \left(-y\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 r351241 = x;
double r351242 = y;
double r351243 = r351241 * r351242;
double r351244 = z;
double r351245 = r351244 * r351242;
double r351246 = r351243 - r351245;
double r351247 = t;
double r351248 = r351246 * r351247;
return r351248;
}
double f(double x, double y, double z, double t) {
double r351249 = t;
double r351250 = -7.898557300438487e+102;
bool r351251 = r351249 <= r351250;
double r351252 = 1.9425146495850532e-44;
bool r351253 = r351249 <= r351252;
double r351254 = !r351253;
bool r351255 = r351251 || r351254;
double r351256 = x;
double r351257 = y;
double r351258 = z;
double r351259 = -r351257;
double r351260 = r351258 * r351259;
double r351261 = fma(r351256, r351257, r351260);
double r351262 = r351261 * r351249;
double r351263 = r351256 - r351258;
double r351264 = r351263 * r351249;
double r351265 = r351257 * r351264;
double r351266 = r351255 ? r351262 : r351265;
return r351266;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
| Original | 7.0 |
|---|---|
| Target | 3.1 |
| Herbie | 3.0 |
if t < -7.898557300438487e+102 or 1.9425146495850532e-44 < t Initial program 3.6
rmApplied fma-neg3.6
Simplified3.6
if -7.898557300438487e+102 < t < 1.9425146495850532e-44Initial program 8.7
rmApplied distribute-rgt-out--8.7
Applied associate-*l*2.6
Final simplification3.0
herbie shell --seed 2019209 +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.2318795828867769e-80) (* (* y t) (- x z)) (if (< t 2.5430670515648771e83) (* y (* t (- x z))) (* (* y (- x z)) t)))
(* (- (* x y) (* z y)) t))