\frac{x \cdot 2}{y \cdot z - t \cdot z}\begin{array}{l}
\mathbf{if}\;x \le -2.854073483132409627892280748735859896789 \cdot 10^{-80} \lor \neg \left(x \le 4.280064491975717546527013185442469963537 \cdot 10^{-221}\right):\\
\;\;\;\;\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1} \cdot \frac{\frac{x}{\frac{y - t}{2}}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1} \cdot \frac{x}{z \cdot \frac{y - t}{2}}\\
\end{array}double f(double x, double y, double z, double t) {
double r531095 = x;
double r531096 = 2.0;
double r531097 = r531095 * r531096;
double r531098 = y;
double r531099 = z;
double r531100 = r531098 * r531099;
double r531101 = t;
double r531102 = r531101 * r531099;
double r531103 = r531100 - r531102;
double r531104 = r531097 / r531103;
return r531104;
}
double f(double x, double y, double z, double t) {
double r531105 = x;
double r531106 = -2.8540734831324096e-80;
bool r531107 = r531105 <= r531106;
double r531108 = 4.2800644919757175e-221;
bool r531109 = r531105 <= r531108;
double r531110 = !r531109;
bool r531111 = r531107 || r531110;
double r531112 = 1.0;
double r531113 = cbrt(r531112);
double r531114 = r531113 * r531113;
double r531115 = r531114 / r531112;
double r531116 = y;
double r531117 = t;
double r531118 = r531116 - r531117;
double r531119 = 2.0;
double r531120 = r531118 / r531119;
double r531121 = r531105 / r531120;
double r531122 = z;
double r531123 = r531121 / r531122;
double r531124 = r531115 * r531123;
double r531125 = r531122 * r531120;
double r531126 = r531105 / r531125;
double r531127 = r531115 * r531126;
double r531128 = r531111 ? r531124 : r531127;
return r531128;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.0 |
|---|---|
| Target | 2.2 |
| Herbie | 3.4 |
if x < -2.8540734831324096e-80 or 4.2800644919757175e-221 < x Initial program 8.3
Simplified7.2
rmApplied *-un-lft-identity7.2
Applied times-frac7.2
Applied *-un-lft-identity7.2
Applied times-frac3.9
Simplified3.9
rmApplied *-un-lft-identity3.9
Applied add-cube-cbrt3.9
Applied times-frac3.9
Applied associate-*l*3.9
Simplified3.8
if -2.8540734831324096e-80 < x < 4.2800644919757175e-221Initial program 3.5
Simplified2.2
rmApplied *-un-lft-identity2.2
Applied times-frac2.2
Applied *-un-lft-identity2.2
Applied times-frac9.9
Simplified9.9
rmApplied *-un-lft-identity9.9
Applied add-cube-cbrt9.9
Applied times-frac9.9
Applied associate-*l*9.9
Simplified9.9
rmApplied div-inv9.9
Applied associate-/l*2.3
Simplified2.2
Final simplification3.4
herbie shell --seed 2019354
(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))))