Average Error: 11.4 → 5.0
Time: 5.1s
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 <= 7440712.289104454) || !(y <= 1.2844427626513389e+85))) {
		VAR = ((double) (((double) (((double) pow(((double) (((double) cbrt(x)) / ((double) cbrt(((double) (y + x)))))), ((double) (x * 2.0)))) * ((double) pow(((double) (((double) cbrt(x)) / ((double) cbrt(((double) (y + x)))))), 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.4
Target8.1
Herbie5.0
\[\]

Derivation

  1. Split input into 2 regimes
  2. if y < 7440712.2891044542 or 1.28444276265133888e85 < y

    1. Initial program 9.3

      \[\]
    2. Simplified9.3

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

      \[\leadsto \]
    5. Applied add-cube-cbrt9.3

      \[\leadsto \]
    6. Applied times-frac9.3

      \[\leadsto \]
    7. Applied unpow-prod-down4.8

      \[\leadsto \]
    8. Simplified4.8

      \[\leadsto \]
    9. Using strategy rm
    10. Applied pow14.8

      \[\leadsto \]
    11. Applied pow14.8

      \[\leadsto \]
    12. Applied pow-prod-up4.8

      \[\leadsto \]
    13. Applied pow-pow3.6

      \[\leadsto \]
    14. Simplified3.6

      \[\leadsto \]

    if 7440712.2891044542 < y < 1.28444276265133888e85

    1. Initial program 37.7

      \[\]
    2. Simplified37.7

      \[\leadsto \]
    3. Using strategy rm
    4. Applied add-log-exp23.7

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

    \[\leadsto \]

Reproduce

herbie shell --seed 2020192 
(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))