\frac{x \cdot 2}{y \cdot z - t \cdot z}\begin{array}{l}
\mathbf{if}\;z \le -2.7183563329919357 \cdot 10^{77}:\\
\;\;\;\;{\left(\frac{1}{\frac{y - t}{2}} \cdot \frac{x}{z}\right)}^{1}\\
\mathbf{elif}\;z \le 8.1507283132915605 \cdot 10^{-182}:\\
\;\;\;\;\frac{x}{\frac{\left(y - t\right) \cdot z}{2}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\frac{1}{\frac{\frac{y - t}{2}}{x}}}{z}\right)}^{1}\\
\end{array}double f(double x, double y, double z, double t) {
double r644588 = x;
double r644589 = 2.0;
double r644590 = r644588 * r644589;
double r644591 = y;
double r644592 = z;
double r644593 = r644591 * r644592;
double r644594 = t;
double r644595 = r644594 * r644592;
double r644596 = r644593 - r644595;
double r644597 = r644590 / r644596;
return r644597;
}
double f(double x, double y, double z, double t) {
double r644598 = z;
double r644599 = -2.7183563329919357e+77;
bool r644600 = r644598 <= r644599;
double r644601 = 1.0;
double r644602 = y;
double r644603 = t;
double r644604 = r644602 - r644603;
double r644605 = 2.0;
double r644606 = r644604 / r644605;
double r644607 = r644601 / r644606;
double r644608 = x;
double r644609 = r644608 / r644598;
double r644610 = r644607 * r644609;
double r644611 = pow(r644610, r644601);
double r644612 = 8.15072831329156e-182;
bool r644613 = r644598 <= r644612;
double r644614 = r644604 * r644598;
double r644615 = r644614 / r644605;
double r644616 = r644608 / r644615;
double r644617 = r644606 / r644608;
double r644618 = r644601 / r644617;
double r644619 = r644618 / r644598;
double r644620 = pow(r644619, r644601);
double r644621 = r644613 ? r644616 : r644620;
double r644622 = r644600 ? r644611 : r644621;
return r644622;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.0 |
|---|---|
| Target | 2.1 |
| Herbie | 3.1 |
if z < -2.7183563329919357e+77Initial program 12.9
Simplified10.5
rmApplied *-un-lft-identity10.5
Applied times-frac10.5
Applied *-un-lft-identity10.5
Applied times-frac2.1
Simplified2.1
rmApplied pow12.1
Applied pow12.1
Applied pow-prod-down2.1
Simplified2.0
rmApplied clear-num2.1
rmApplied *-un-lft-identity2.1
Applied div-inv2.1
Applied add-sqr-sqrt2.1
Applied times-frac2.1
Applied times-frac2.1
Simplified2.1
Simplified2.1
if -2.7183563329919357e+77 < z < 8.15072831329156e-182Initial program 3.1
Simplified3.0
rmApplied *-commutative3.0
if 8.15072831329156e-182 < z Initial program 7.6
Simplified5.9
rmApplied *-un-lft-identity5.9
Applied times-frac5.9
Applied *-un-lft-identity5.9
Applied times-frac3.4
Simplified3.4
rmApplied pow13.4
Applied pow13.4
Applied pow-prod-down3.4
Simplified3.4
rmApplied clear-num3.6
Final simplification3.1
herbie shell --seed 2020100
(FPCore (x y z t)
:name "Linear.Projection:infinitePerspective from linear-1.19.1.3, A"
:precision binary64
:herbie-target
(if (< (/ (* x 2) (- (* y z) (* t z))) -2.559141628295061e-13) (* (/ x (* (- y t) z)) 2) (if (< (/ (* x 2) (- (* y z) (* t z))) 1.0450278273301259e-269) (/ (* (/ x z) 2) (- y t)) (* (/ x (* (- y t) z)) 2)))
(/ (* x 2) (- (* y z) (* t z))))