\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t
\left(\left(x \cdot \sqrt[3]{\sqrt[3]{{\left(\log y\right)}^{6}}}\right) \cdot \sqrt[3]{\log y} + z \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right) - tdouble code(double x, double y, double z, double t) {
return ((double) (((double) (((double) (x * ((double) log(y)))) + ((double) (z * ((double) log(((double) (1.0 - y)))))))) - t));
}
double code(double x, double y, double z, double t) {
return ((double) (((double) (((double) (((double) (x * ((double) cbrt(((double) cbrt(((double) pow(((double) log(y)), 6.0)))))))) * ((double) cbrt(((double) log(y)))))) + ((double) (z * ((double) (((double) log(1.0)) - ((double) (((double) (1.0 * y)) + ((double) (0.5 * ((double) (((double) pow(y, 2.0)) / ((double) pow(1.0, 2.0)))))))))))))) - t));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 9.4 |
|---|---|
| Target | 0.3 |
| Herbie | 0.6 |
Initial program 9.4
Taylor expanded around 0 0.4
rmApplied add-cube-cbrt0.8
Applied associate-*r*0.8
rmApplied cbrt-unprod0.6
Simplified0.6
rmApplied add-cbrt-cube0.6
Simplified0.6
Final simplification0.6
herbie shell --seed 2020129
(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.0 (* 1.0 1.0))) (* y (* y y))))) (- t (* x (log y))))
(- (+ (* x (log y)) (* z (log (- 1.0 y)))) t))