Average Error: 11.1 → 4.1
Time: 7.8s
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 <= 12433.702630748592) || !(y <= 2.1445464243574002e+154))) {
		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) cbrt(((double) pow(((double) (((double) pow(((double) (x / ((double) (y + x)))), x)) / x)), 3.0))));
	}
	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.1
Target7.7
Herbie4.1
\[\]

Derivation

  1. Split input into 2 regimes
  2. if y < 12433.7026307485921 or 2.14454642435740023e154 < y

    1. Initial program 7.5

      \[\]
    2. Simplified7.5

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

      \[\leadsto \]
    5. Applied add-cube-cbrt7.5

      \[\leadsto \]
    6. Applied times-frac7.5

      \[\leadsto \]
    7. Applied unpow-prod-down3.1

      \[\leadsto \]
    8. Simplified3.1

      \[\leadsto \]
    9. Using strategy rm
    10. Applied pow13.1

      \[\leadsto \]
    11. Applied pow13.1

      \[\leadsto \]
    12. Applied pow-prod-up3.1

      \[\leadsto \]
    13. Applied pow-pow2.0

      \[\leadsto \]
    14. Simplified2.0

      \[\leadsto \]

    if 12433.7026307485921 < y < 2.14454642435740023e154

    1. Initial program 35.2

      \[\]
    2. Simplified35.2

      \[\leadsto \]
    3. Using strategy rm
    4. Applied add-cbrt-cube18.5

      \[\leadsto \]
    5. Applied add-cbrt-cube18.6

      \[\leadsto \]
    6. Applied cbrt-undiv18.8

      \[\leadsto \]
    7. Simplified18.9

      \[\leadsto \]
  3. Recombined 2 regimes into one program.
  4. Final simplification4.1

    \[\leadsto \]

Reproduce

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