\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 r238084 = x;
double r238085 = y;
double r238086 = log(r238085);
double r238087 = r238084 * r238086;
double r238088 = z;
double r238089 = 1.0;
double r238090 = r238089 - r238085;
double r238091 = log(r238090);
double r238092 = r238088 * r238091;
double r238093 = r238087 + r238092;
double r238094 = t;
double r238095 = r238093 - r238094;
return r238095;
}
double f(double x, double y, double z, double t) {
double r238096 = x;
double r238097 = y;
double r238098 = log(r238097);
double r238099 = z;
double r238100 = 1.0;
double r238101 = log(r238100);
double r238102 = r238100 * r238097;
double r238103 = r238101 - r238102;
double r238104 = 2.0;
double r238105 = pow(r238097, r238104);
double r238106 = r238099 * r238105;
double r238107 = pow(r238100, r238104);
double r238108 = r238106 / r238107;
double r238109 = -0.5;
double r238110 = r238108 * r238109;
double r238111 = fma(r238099, r238103, r238110);
double r238112 = fma(r238096, r238098, r238111);
double r238113 = cbrt(r238112);
double r238114 = r238113 * r238113;
double r238115 = cbrt(r238114);
double r238116 = cbrt(r238113);
double r238117 = r238115 * r238116;
double r238118 = r238114 * r238117;
double r238119 = t;
double r238120 = r238118 - r238119;
return r238120;
}




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))