\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 r315042 = x;
double r315043 = y;
double r315044 = log(r315043);
double r315045 = r315042 * r315044;
double r315046 = z;
double r315047 = 1.0;
double r315048 = r315047 - r315043;
double r315049 = log(r315048);
double r315050 = r315046 * r315049;
double r315051 = r315045 + r315050;
double r315052 = t;
double r315053 = r315051 - r315052;
return r315053;
}
double f(double x, double y, double z, double t) {
double r315054 = x;
double r315055 = y;
double r315056 = log(r315055);
double r315057 = z;
double r315058 = 1.0;
double r315059 = log(r315058);
double r315060 = r315058 * r315055;
double r315061 = r315059 - r315060;
double r315062 = 2.0;
double r315063 = pow(r315055, r315062);
double r315064 = r315057 * r315063;
double r315065 = pow(r315058, r315062);
double r315066 = r315064 / r315065;
double r315067 = -0.5;
double r315068 = r315066 * r315067;
double r315069 = fma(r315057, r315061, r315068);
double r315070 = fma(r315054, r315056, r315069);
double r315071 = cbrt(r315070);
double r315072 = r315071 * r315071;
double r315073 = cbrt(r315072);
double r315074 = cbrt(r315071);
double r315075 = r315073 * r315074;
double r315076 = r315072 * r315075;
double r315077 = t;
double r315078 = r315076 - r315077;
return r315078;
}




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