\frac{x \cdot 2}{y \cdot z - t \cdot z}\begin{array}{l}
\mathbf{if}\;x \le -2.0397032106121382 \cdot 10^{-57} \lor \neg \left(x \le 4.5645374866027015 \cdot 10^{-88}\right):\\
\;\;\;\;\frac{\frac{x}{\frac{y - t}{2}}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{z}}{y - t} \cdot \frac{\sqrt[3]{x}}{\frac{1}{2}}\\
\end{array}double f(double x, double y, double z, double t) {
double r547815 = x;
double r547816 = 2.0;
double r547817 = r547815 * r547816;
double r547818 = y;
double r547819 = z;
double r547820 = r547818 * r547819;
double r547821 = t;
double r547822 = r547821 * r547819;
double r547823 = r547820 - r547822;
double r547824 = r547817 / r547823;
return r547824;
}
double f(double x, double y, double z, double t) {
double r547825 = x;
double r547826 = -2.0397032106121382e-57;
bool r547827 = r547825 <= r547826;
double r547828 = 4.5645374866027015e-88;
bool r547829 = r547825 <= r547828;
double r547830 = !r547829;
bool r547831 = r547827 || r547830;
double r547832 = y;
double r547833 = t;
double r547834 = r547832 - r547833;
double r547835 = 2.0;
double r547836 = r547834 / r547835;
double r547837 = r547825 / r547836;
double r547838 = z;
double r547839 = r547837 / r547838;
double r547840 = cbrt(r547825);
double r547841 = r547840 * r547840;
double r547842 = r547841 / r547838;
double r547843 = r547842 / r547834;
double r547844 = 1.0;
double r547845 = r547844 / r547835;
double r547846 = r547840 / r547845;
double r547847 = r547843 * r547846;
double r547848 = r547831 ? r547839 : r547847;
return r547848;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.8 |
|---|---|
| Target | 2.3 |
| Herbie | 2.2 |
if x < -2.0397032106121382e-57 or 4.5645374866027015e-88 < x Initial program 9.0
Simplified8.1
rmApplied *-un-lft-identity8.1
Applied times-frac8.1
Applied *-un-lft-identity8.1
Applied times-frac2.5
Simplified2.5
rmApplied associate-*l/2.4
Simplified2.4
if -2.0397032106121382e-57 < x < 4.5645374866027015e-88Initial program 3.6
Simplified2.2
rmApplied *-un-lft-identity2.2
Applied times-frac2.2
Applied *-un-lft-identity2.2
Applied times-frac9.3
Simplified9.3
rmApplied div-inv9.3
Applied add-cube-cbrt9.7
Applied times-frac9.7
Applied associate-*r*6.4
Simplified2.0
Final simplification2.2
herbie shell --seed 2020039
(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))))