x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}x + \frac{e^{y \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{y + z}}\right)\right)} \cdot {\left(\frac{\sqrt[3]{y}}{\sqrt[3]{y + z}}\right)}^{y}}{y}(FPCore (x y z) :precision binary64 (+ x (/ (exp (* y (log (/ y (+ z y))))) y)))
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
(exp (* y (* 2.0 (log (/ (cbrt y) (cbrt (+ y z)))))))
(pow (/ (cbrt y) (cbrt (+ y z))) y))
y)))double code(double x, double y, double z) {
return x + (exp(y * log(y / (z + y))) / y);
}
double code(double x, double y, double z) {
return x + ((exp(y * (2.0 * log(cbrt(y) / cbrt(y + z)))) * pow((cbrt(y) / cbrt(y + z)), y)) / y);
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.1 |
|---|---|
| Target | 0.9 |
| Herbie | 0.9 |
Initial program 6.1
Simplified6.1
rmApplied add-cube-cbrt_binary6419.9
Applied add-cube-cbrt_binary646.1
Applied times-frac_binary646.1
Applied unpow-prod-down_binary641.9
rmApplied pow-to-exp_binary641.9
Simplified0.9
Final simplification0.9
herbie shell --seed 2020233
(FPCore (x y z)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, G"
:precision binary64
:herbie-target
(if (< (/ y (+ z y)) 7.1154157597908e-315) (+ x (/ (exp (/ -1.0 z)) y)) (+ x (/ (exp (log (pow (/ y (+ y z)) y))) y)))
(+ x (/ (exp (* y (log (/ y (+ z y))))) y)))