\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t
\left(\sqrt[3]{\mathsf{fma}\left(x, \log y, \mathsf{fma}\left(z, \log 1 - 1 \cdot y, \frac{z \cdot {y}^{2}}{{1}^{2}} \cdot \frac{-1}{2}\right)\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, \log y, \mathsf{fma}\left(z, \log 1 - 1 \cdot y, \frac{z \cdot {y}^{2}}{{1}^{2}} \cdot \frac{-1}{2}\right)\right)}\right) \cdot \left(\sqrt[3]{\sqrt[3]{\mathsf{fma}\left(x, \log y, \mathsf{fma}\left(z, \log 1 - 1 \cdot y, \frac{z \cdot {y}^{2}}{{1}^{2}} \cdot \frac{-1}{2}\right)\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, \log y, \mathsf{fma}\left(z, \log 1 - 1 \cdot y, \frac{z \cdot {y}^{2}}{{1}^{2}} \cdot \frac{-1}{2}\right)\right)}} \cdot \sqrt[3]{\sqrt[3]{\mathsf{fma}\left(x, \log y, \mathsf{fma}\left(z, \log 1 - 1 \cdot y, \frac{z \cdot {y}^{2}}{{1}^{2}} \cdot \frac{-1}{2}\right)\right)}}\right) - tdouble f(double x, double y, double z, double t) {
double r331908 = x;
double r331909 = y;
double r331910 = log(r331909);
double r331911 = r331908 * r331910;
double r331912 = z;
double r331913 = 1.0;
double r331914 = r331913 - r331909;
double r331915 = log(r331914);
double r331916 = r331912 * r331915;
double r331917 = r331911 + r331916;
double r331918 = t;
double r331919 = r331917 - r331918;
return r331919;
}
double f(double x, double y, double z, double t) {
double r331920 = x;
double r331921 = y;
double r331922 = log(r331921);
double r331923 = z;
double r331924 = 1.0;
double r331925 = log(r331924);
double r331926 = r331924 * r331921;
double r331927 = r331925 - r331926;
double r331928 = 2.0;
double r331929 = pow(r331921, r331928);
double r331930 = r331923 * r331929;
double r331931 = pow(r331924, r331928);
double r331932 = r331930 / r331931;
double r331933 = -0.5;
double r331934 = r331932 * r331933;
double r331935 = fma(r331923, r331927, r331934);
double r331936 = fma(r331920, r331922, r331935);
double r331937 = cbrt(r331936);
double r331938 = r331937 * r331937;
double r331939 = cbrt(r331938);
double r331940 = cbrt(r331937);
double r331941 = r331939 * r331940;
double r331942 = r331938 * r331941;
double r331943 = t;
double r331944 = r331942 - r331943;
return r331944;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
| Original | 9.7 |
|---|---|
| Target | 0.3 |
| Herbie | 1.1 |
Initial program 9.7
Simplified9.7
Taylor expanded around 0 0.3
Simplified0.3
rmApplied add-cube-cbrt1.0
rmApplied add-cube-cbrt1.0
Applied cbrt-prod1.1
Final simplification1.1
herbie shell --seed 2019323 +o rules:numerics
(FPCore (x y z t)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, B"
:precision binary64
:herbie-target
(- (* (- z) (+ (+ (* 0.5 (* y y)) y) (* (/ 0.3333333333333333 (* 1 (* 1 1))) (* y (* y y))))) (- t (* x (log y))))
(- (+ (* x (log y)) (* z (log (- 1 y)))) t))