\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y \le -4.459424609020142156947398974899037795759 \cdot 10^{249} \lor \neg \left(x \cdot y - z \cdot y \le -1.008422558588387463522628361222361000871 \cdot 10^{-262} \lor \neg \left(x \cdot y - z \cdot y \le 4.940656458412465441765687928682213723651 \cdot 10^{-324}\right) \land x \cdot y - z \cdot y \le 5.349644244500557066718563752047260703027 \cdot 10^{131}\right):\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\
\end{array}double f(double x, double y, double z, double t) {
double r472384 = x;
double r472385 = y;
double r472386 = r472384 * r472385;
double r472387 = z;
double r472388 = r472387 * r472385;
double r472389 = r472386 - r472388;
double r472390 = t;
double r472391 = r472389 * r472390;
return r472391;
}
double f(double x, double y, double z, double t) {
double r472392 = x;
double r472393 = y;
double r472394 = r472392 * r472393;
double r472395 = z;
double r472396 = r472395 * r472393;
double r472397 = r472394 - r472396;
double r472398 = -4.459424609020142e+249;
bool r472399 = r472397 <= r472398;
double r472400 = -1.0084225585883875e-262;
bool r472401 = r472397 <= r472400;
double r472402 = 4.9406564584125e-324;
bool r472403 = r472397 <= r472402;
double r472404 = !r472403;
double r472405 = 5.349644244500557e+131;
bool r472406 = r472397 <= r472405;
bool r472407 = r472404 && r472406;
bool r472408 = r472401 || r472407;
double r472409 = !r472408;
bool r472410 = r472399 || r472409;
double r472411 = r472392 - r472395;
double r472412 = t;
double r472413 = r472411 * r472412;
double r472414 = r472393 * r472413;
double r472415 = r472397 * r472412;
double r472416 = r472410 ? r472414 : r472415;
return r472416;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.6 |
|---|---|
| Target | 2.9 |
| Herbie | 0.8 |
if (- (* x y) (* z y)) < -4.459424609020142e+249 or -1.0084225585883875e-262 < (- (* x y) (* z y)) < 4.9406564584125e-324 or 5.349644244500557e+131 < (- (* x y) (* z y)) Initial program 22.7
rmApplied distribute-rgt-out--22.7
Applied associate-*l*1.9
if -4.459424609020142e+249 < (- (* x y) (* z y)) < -1.0084225585883875e-262 or 4.9406564584125e-324 < (- (* x y) (* z y)) < 5.349644244500557e+131Initial program 0.3
Final simplification0.8
herbie shell --seed 2019212
(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))