Average Error: 1.9 → 2.0
Time: 13.6s
Precision: binary64
\[\]
\[\]
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;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original1.9
Target10.6
Herbie2.0
\[\]

Derivation

  1. Split input into 2 regimes
  2. if (* (- t 1.0) (log a)) < -703.6965886943181 or -142.39162598830387 < (* (- t 1.0) (log a))

    1. Initial program 0.6

      \[\]

    if -703.6965886943181 < (* (- t 1.0) (log a)) < -142.39162598830387

    1. Initial program 6.5

      \[\]
    2. Simplified6.6

      \[\leadsto \]
  3. Recombined 2 regimes into one program.
  4. Final simplification2.0

    \[\leadsto \]

Reproduce

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))