double code(double x, double y, double z, double t, double a, double b) {
return ((double) (((double) (x * ((double) exp(((double) (((double) (((double) (y * ((double) log(z)))) + ((double) (((double) (t - 1.0)) * ((double) log(a)))))) - b)))))) / y));
}
double code(double x, double y, double z, double t, double a, double b) {
double VAR;
if (((((double) (((double) (t - 1.0)) * ((double) log(a)))) <= -703.696588694318) || !(((double) (((double) (t - 1.0)) * ((double) log(a)))) <= -142.39162598830387))) {
VAR = ((double) (((double) (x * ((double) exp(((double) (((double) (((double) (((double) (t - 1.0)) * ((double) log(a)))) + ((double) (y * ((double) log(z)))))) - b)))))) / y));
} else {
VAR = ((double) (x * ((double) (((double) (((double) pow(a, ((double) (t - 1.0)))) / ((double) exp(b)))) * ((double) (((double) pow(z, y)) / y))))));
}
return VAR;
}




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.6 |
| Herbie | 2.0 |
if (* (- t 1.0) (log a)) < -703.6965886943181 or -142.39162598830387 < (* (- t 1.0) (log a)) Initial program 0.6
if -703.6965886943181 < (* (- t 1.0) (log a)) < -142.39162598830387Initial program 6.5
Simplified6.6
Final simplification2.0
herbie shell --seed 2020191
(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.0)) y)) (- (+ b 1.0) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1.0))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))