\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;y \le -24528.73585804069443838670849800109863281:\\
\;\;\;\;\left(t \cdot y\right) \cdot \left(x - z\right)\\
\mathbf{elif}\;y \le 2.583080580921436072391451137817466644029 \cdot 10^{67}:\\
\;\;\;\;\left(y \cdot \left(x - z\right)\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\end{array}double f(double x, double y, double z, double t) {
double r380190 = x;
double r380191 = y;
double r380192 = r380190 * r380191;
double r380193 = z;
double r380194 = r380193 * r380191;
double r380195 = r380192 - r380194;
double r380196 = t;
double r380197 = r380195 * r380196;
return r380197;
}
double f(double x, double y, double z, double t) {
double r380198 = y;
double r380199 = -24528.735858040694;
bool r380200 = r380198 <= r380199;
double r380201 = t;
double r380202 = r380201 * r380198;
double r380203 = x;
double r380204 = z;
double r380205 = r380203 - r380204;
double r380206 = r380202 * r380205;
double r380207 = 2.583080580921436e+67;
bool r380208 = r380198 <= r380207;
double r380209 = r380198 * r380205;
double r380210 = r380209 * r380201;
double r380211 = r380205 * r380201;
double r380212 = r380198 * r380211;
double r380213 = r380208 ? r380210 : r380212;
double r380214 = r380200 ? r380206 : r380213;
return r380214;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.2 |
|---|---|
| Target | 3.2 |
| Herbie | 3.0 |
if y < -24528.735858040694Initial program 15.9
Simplified15.9
rmApplied associate-*l*3.4
rmApplied add-cube-cbrt4.4
Applied associate-*l*4.4
rmApplied add-cube-cbrt4.7
Taylor expanded around inf 15.9
Simplified4.5
if -24528.735858040694 < y < 2.583080580921436e+67Initial program 2.4
Simplified2.4
if 2.583080580921436e+67 < y Initial program 19.4
Simplified19.4
rmApplied associate-*l*4.0
Final simplification3.0
herbie shell --seed 2019323 +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))