\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\frac{x}{{\left({a}^{1}\right)}^{1} \cdot \left(e^{\log \left(\frac{1}{z}\right) \cdot y + \left(\log \left(\frac{1}{a}\right) \cdot t + b\right)} \cdot y\right)}double code(double x, double y, double z, double t, double a, double b) {
return ((x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y);
}
double code(double x, double y, double z, double t, double a, double b) {
return (x / (pow(pow(a, 1.0), 1.0) * (exp(((log((1.0 / z)) * y) + ((log((1.0 / a)) * t) + b))) * y)));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
Results
| Original | 1.9 |
|---|---|
| Target | 10.9 |
| Herbie | 1.4 |
Initial program 1.9
Taylor expanded around inf 1.9
Simplified1.2
rmApplied associate-/l*1.4
Taylor expanded around inf 1.4
Final simplification1.4
herbie shell --seed 2020058 +o rules:numerics
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1) (log a))) b))) y))