\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;\left(x \cdot y - z \cdot y\right) \cdot t \le -4.20560211460467888 \cdot 10^{58}:\\
\;\;\;\;\left(t \cdot y\right) \cdot \left(x - z\right)\\
\mathbf{elif}\;\left(x \cdot y - z \cdot y\right) \cdot t \le 0.0:\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{elif}\;\left(x \cdot y - z \cdot y\right) \cdot t \le 2.8915212837881257 \cdot 10^{305}:\\
\;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot y\right) \cdot \left(x - z\right)\\
\end{array}double f(double x, double y, double z, double t) {
double r539543 = x;
double r539544 = y;
double r539545 = r539543 * r539544;
double r539546 = z;
double r539547 = r539546 * r539544;
double r539548 = r539545 - r539547;
double r539549 = t;
double r539550 = r539548 * r539549;
return r539550;
}
double f(double x, double y, double z, double t) {
double r539551 = x;
double r539552 = y;
double r539553 = r539551 * r539552;
double r539554 = z;
double r539555 = r539554 * r539552;
double r539556 = r539553 - r539555;
double r539557 = t;
double r539558 = r539556 * r539557;
double r539559 = -4.205602114604679e+58;
bool r539560 = r539558 <= r539559;
double r539561 = r539557 * r539552;
double r539562 = r539551 - r539554;
double r539563 = r539561 * r539562;
double r539564 = 0.0;
bool r539565 = r539558 <= r539564;
double r539566 = r539562 * r539557;
double r539567 = r539552 * r539566;
double r539568 = 2.8915212837881257e+305;
bool r539569 = r539558 <= r539568;
double r539570 = r539569 ? r539558 : r539563;
double r539571 = r539565 ? r539567 : r539570;
double r539572 = r539560 ? r539563 : r539571;
return r539572;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.2 |
|---|---|
| Target | 3.3 |
| Herbie | 1.7 |
if (* (- (* x y) (* z y)) t) < -4.205602114604679e+58 or 2.8915212837881257e+305 < (* (- (* x y) (* z y)) t) Initial program 23.1
Taylor expanded around inf 23.1
Simplified2.8
if -4.205602114604679e+58 < (* (- (* x y) (* z y)) t) < 0.0Initial program 3.3
rmApplied distribute-rgt-out--3.3
Applied associate-*l*2.4
if 0.0 < (* (- (* x y) (* z y)) t) < 2.8915212837881257e+305Initial program 0.4
Final simplification1.7
herbie shell --seed 2020081 +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))