\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t
\left(x \cdot \log y + \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \left(\sqrt[3]{z} \cdot \left(\log 1 + \left(\frac{y}{1} \cdot \left(\frac{y}{1} \cdot -0.5\right) - y \cdot 1\right)\right)\right)\right) - t(FPCore (x y z t) :precision binary64 (- (+ (* x (log y)) (* z (log (- 1.0 y)))) t))
(FPCore (x y z t)
:precision binary64
(-
(+
(* x (log y))
(*
(* (cbrt z) (cbrt z))
(* (cbrt z) (+ (log 1.0) (- (* (/ y 1.0) (* (/ y 1.0) -0.5)) (* y 1.0))))))
t))double 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) (x * ((double) log(y)))) + ((double) (((double) (((double) cbrt(z)) * ((double) cbrt(z)))) * ((double) (((double) cbrt(z)) * ((double) (((double) log(1.0)) + ((double) (((double) ((y / 1.0) * ((double) ((y / 1.0) * -0.5)))) - ((double) (y * 1.0)))))))))))) - t));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 9.2 |
|---|---|
| Target | 0.3 |
| Herbie | 0.5 |
Initial program Error: 9.2 bits
Taylor expanded around 0 Error: 0.3 bits
SimplifiedError: 0.3 bits
rmApplied add-cube-cbrtError: 0.5 bits
Applied associate-*l*Error: 0.5 bits
SimplifiedError: 0.5 bits
Final simplificationError: 0.5 bits
herbie shell --seed 2020204
(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))