\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y = -\infty:\\
\;\;\;\;\left(x - z\right) \cdot \left(y \cdot t\right)\\
\mathbf{elif}\;x \cdot y - z \cdot y \le -3.3051966934809397 \cdot 10^{-153}:\\
\;\;\;\;t \cdot \left(x \cdot y - z \cdot y\right)\\
\mathbf{elif}\;x \cdot y - z \cdot y \le 1.7178429536978092 \cdot 10^{-196}:\\
\;\;\;\;\left(x - z\right) \cdot \left(y \cdot t\right)\\
\mathbf{elif}\;x \cdot y - z \cdot y \le 9.555835303684123 \cdot 10^{+230}:\\
\;\;\;\;t \cdot \left(x \cdot y - z \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot \left(x - z\right)\right) \cdot y\\
\end{array}double f(double x, double y, double z, double t) {
double r28302476 = x;
double r28302477 = y;
double r28302478 = r28302476 * r28302477;
double r28302479 = z;
double r28302480 = r28302479 * r28302477;
double r28302481 = r28302478 - r28302480;
double r28302482 = t;
double r28302483 = r28302481 * r28302482;
return r28302483;
}
double f(double x, double y, double z, double t) {
double r28302484 = x;
double r28302485 = y;
double r28302486 = r28302484 * r28302485;
double r28302487 = z;
double r28302488 = r28302487 * r28302485;
double r28302489 = r28302486 - r28302488;
double r28302490 = -inf.0;
bool r28302491 = r28302489 <= r28302490;
double r28302492 = r28302484 - r28302487;
double r28302493 = t;
double r28302494 = r28302485 * r28302493;
double r28302495 = r28302492 * r28302494;
double r28302496 = -3.3051966934809397e-153;
bool r28302497 = r28302489 <= r28302496;
double r28302498 = r28302493 * r28302489;
double r28302499 = 1.7178429536978092e-196;
bool r28302500 = r28302489 <= r28302499;
double r28302501 = 9.555835303684123e+230;
bool r28302502 = r28302489 <= r28302501;
double r28302503 = r28302493 * r28302492;
double r28302504 = r28302503 * r28302485;
double r28302505 = r28302502 ? r28302498 : r28302504;
double r28302506 = r28302500 ? r28302495 : r28302505;
double r28302507 = r28302497 ? r28302498 : r28302506;
double r28302508 = r28302491 ? r28302495 : r28302507;
return r28302508;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.9 |
|---|---|
| Target | 3.0 |
| Herbie | 0.5 |
if (- (* x y) (* z y)) < -inf.0 or -3.3051966934809397e-153 < (- (* x y) (* z y)) < 1.7178429536978092e-196Initial program 18.6
Simplified1.0
if -inf.0 < (- (* x y) (* z y)) < -3.3051966934809397e-153 or 1.7178429536978092e-196 < (- (* x y) (* z y)) < 9.555835303684123e+230Initial program 0.3
if 9.555835303684123e+230 < (- (* x y) (* z y)) Initial program 34.0
rmApplied distribute-rgt-out--33.8
Applied associate-*l*0.9
Final simplification0.5
herbie shell --seed 2019168 +o rules:numerics
(FPCore (x y z t)
:name "Linear.Projection:inverseInfinitePerspective from linear-1.19.1.3"
: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))