\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y \le -2.463499167606939085331656027995681059505 \cdot 10^{200} \lor \neg \left(x \cdot y - z \cdot y \le 6.777688716742269720248573286984588117237 \cdot 10^{235}\right):\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + \left(-z \cdot y\right)\right) \cdot t\\
\end{array}double f(double x, double y, double z, double t) {
double r490305 = x;
double r490306 = y;
double r490307 = r490305 * r490306;
double r490308 = z;
double r490309 = r490308 * r490306;
double r490310 = r490307 - r490309;
double r490311 = t;
double r490312 = r490310 * r490311;
return r490312;
}
double f(double x, double y, double z, double t) {
double r490313 = x;
double r490314 = y;
double r490315 = r490313 * r490314;
double r490316 = z;
double r490317 = r490316 * r490314;
double r490318 = r490315 - r490317;
double r490319 = -2.463499167606939e+200;
bool r490320 = r490318 <= r490319;
double r490321 = 6.77768871674227e+235;
bool r490322 = r490318 <= r490321;
double r490323 = !r490322;
bool r490324 = r490320 || r490323;
double r490325 = r490313 - r490316;
double r490326 = t;
double r490327 = r490325 * r490326;
double r490328 = r490314 * r490327;
double r490329 = -r490317;
double r490330 = r490315 + r490329;
double r490331 = r490330 * r490326;
double r490332 = r490324 ? r490328 : r490331;
return r490332;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.0 |
|---|---|
| Target | 3.2 |
| Herbie | 1.4 |
if (- (* x y) (* z y)) < -2.463499167606939e+200 or 6.77768871674227e+235 < (- (* x y) (* z y)) Initial program 32.1
rmApplied distribute-rgt-out--32.1
Applied associate-*l*0.8
if -2.463499167606939e+200 < (- (* x y) (* z y)) < 6.77768871674227e+235Initial program 1.5
rmApplied sub-neg1.5
Final simplification1.4
herbie shell --seed 2019322
(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))