Average Error: 11.6 → 8.0
Time: 5.9s
Precision: binary64
\[\]
\[\]
double code(double x, double y) {
	return ((double) (((double) exp(((double) (x * ((double) log(((double) (x / ((double) (x + y)))))))))) / x));
}
double code(double x, double y) {
	double VAR;
	if (((y <= 562.7291412801162) || (!(y <= 1.3132932824772298e+62) && (y <= 5.264348161777968e+115)))) {
		VAR = ((double) (((double) pow(1.0, ((double) cbrt(x)))) / x));
	} else {
		VAR = ((double) log(((double) exp(((double) (((double) pow(((double) (x / ((double) (y + x)))), x)) / x))))));
	}
	return VAR;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original11.6
Target8.0
Herbie8.0
\[\]

Derivation

  1. Split input into 2 regimes
  2. if y < 562.72914128011621 or 1.31329328247722981e62 < y < 5.26434816177796769e115

    1. Initial program 6.3

      \[\]
    2. Simplified6.3

      \[\leadsto \]
    3. Using strategy rm
    4. Applied add-cube-cbrt6.3

      \[\leadsto \]
    5. Applied pow-unpow6.3

      \[\leadsto \]
    6. Taylor expanded around inf 36.3

      \[\leadsto \]
    7. Simplified3.3

      \[\leadsto \]

    if 562.72914128011621 < y < 1.31329328247722981e62 or 5.26434816177796769e115 < y

    1. Initial program 33.0

      \[\]
    2. Simplified33.0

      \[\leadsto \]
    3. Using strategy rm
    4. Applied add-log-exp27.2

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

    \[\leadsto \]

Reproduce

herbie shell --seed 2020179 
(FPCore (x y)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
  :precision binary64

  :herbie-target
  (if (< y -3.7311844206647956e+94) (/ (exp (/ -1.0 y)) x) (if (< y 2.817959242728288e+37) (/ (pow (/ x (+ y x)) x) x) (if (< y 2.347387415166998e+178) (log (exp (/ (pow (/ x (+ y x)) x) x))) (/ (exp (/ -1.0 y)) x))))

  (/ (exp (* x (log (/ x (+ x y))))) x))