double code(double x, double y, double z, double t, double a, double b, double c) {
return ((double) (x / ((double) (x + ((double) (y * ((double) exp(((double) (2.0 * ((double) (((double) (((double) (z * ((double) sqrt(((double) (t + a)))))) / t)) - ((double) (((double) (b - c)) * ((double) (((double) (a + ((double) (5.0 / 6.0)))) - ((double) (2.0 / ((double) (t * 3.0))))))))))))))))))));
}
double code(double x, double y, double z, double t, double a, double b, double c) {
double VAR;
if (((a <= 2.789491421478102e+219) || !(a <= 2.104146032475743e+298))) {
VAR = ((double) (x / ((double) (x + ((double) (y * ((double) pow(((double) exp(2.0)), ((double) (((double) (z * ((double) (((double) sqrt(((double) (a + t)))) / t)))) + ((double) (((double) (b - c)) * ((double) (((double) (2.0 / ((double) (t * 3.0)))) - ((double) (a + ((double) (5.0 / 6.0))))))))))))))))));
} else {
VAR = ((double) (x / ((double) (x + ((double) (y * ((double) pow(((double) exp(2.0)), ((double) (((double) (c * 0.8333333333333334)) + ((double) (a * ((double) (c - b))))))))))))));
}
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




Bits error versus c
Results
| Original | 3.5 |
|---|---|
| Target | 2.8 |
| Herbie | 3.1 |
if a < 2.78949142147810206e219 or 2.10414603247574298e298 < a Initial program 3.1
Simplified2.5
if 2.78949142147810206e219 < a < 2.10414603247574298e298Initial program 6.8
Simplified7.5
rmApplied add-log-exp19.4
Taylor expanded around inf 12.3
Simplified7.4
Final simplification3.1
herbie shell --seed 2020190
(FPCore (x y z t a b c)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, I"
:precision binary64
:herbie-target
(if (< t -2.118326644891581e-50) (/ x (+ x (* y (exp (* 2.0 (- (+ (* a c) (* 0.8333333333333334 c)) (* a b))))))) (if (< t 5.196588770651547e-123) (/ x (+ x (* y (exp (* 2.0 (/ (- (* (* z (sqrt (+ t a))) (* (* 3.0 t) (- a (/ 5.0 6.0)))) (* (- (* (+ (/ 5.0 6.0) a) (* 3.0 t)) 2.0) (* (- a (/ 5.0 6.0)) (* (- b c) t)))) (* (* (* t t) 3.0) (- a (/ 5.0 6.0))))))))) (/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))))
(/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))