Average Error: 5.9 → 1.5
Time: 4.4s
Precision: binary64
\[x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}\]
\[\begin{array}{l} \mathbf{if}\;y \leq -4.0045564192006734 \cdot 10^{+44}:\\ \;\;\;\;x + \frac{1}{y \cdot e^{z}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{{\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{y + z} \cdot \sqrt[3]{y + z}}\right)}^{y} \cdot {\left(\frac{\sqrt[3]{y}}{\sqrt[3]{y + z}}\right)}^{y}}{y}\\ \end{array}\]
x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}
\begin{array}{l}
\mathbf{if}\;y \leq -4.0045564192006734 \cdot 10^{+44}:\\
\;\;\;\;x + \frac{1}{y \cdot e^{z}}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{{\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{y + z} \cdot \sqrt[3]{y + z}}\right)}^{y} \cdot {\left(\frac{\sqrt[3]{y}}{\sqrt[3]{y + z}}\right)}^{y}}{y}\\

\end{array}
(FPCore (x y z)
 :precision binary64
 (+ x (/ (exp (* y (log (/ y (+ z y))))) y)))
(FPCore (x y z)
 :precision binary64
 (if (<= y -4.0045564192006734e+44)
   (+ x (/ 1.0 (* y (exp z))))
   (+
    x
    (/
     (*
      (pow (/ (* (cbrt y) (cbrt y)) (* (cbrt (+ y z)) (cbrt (+ y z)))) y)
      (pow (/ (cbrt y) (cbrt (+ y z))) y))
     y))))
double code(double x, double y, double z) {
	return ((double) (x + (((double) exp(((double) (y * ((double) log((y / ((double) (z + y))))))))) / y)));
}
double code(double x, double y, double z) {
	double tmp;
	if ((y <= -4.0045564192006734e+44)) {
		tmp = ((double) (x + (1.0 / ((double) (y * ((double) exp(z)))))));
	} else {
		tmp = ((double) (x + (((double) (((double) pow((((double) (((double) cbrt(y)) * ((double) cbrt(y)))) / ((double) (((double) cbrt(((double) (y + z)))) * ((double) cbrt(((double) (y + z))))))), y)) * ((double) pow((((double) cbrt(y)) / ((double) cbrt(((double) (y + z))))), y)))) / y)));
	}
	return tmp;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original5.9
Target1.2
Herbie1.5
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z + y} < 7.1154157597908 \cdot 10^{-315}:\\ \;\;\;\;x + \frac{e^{\frac{-1}{z}}}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{e^{\log \left({\left(\frac{y}{y + z}\right)}^{y}\right)}}{y}\\ \end{array}\]

Derivation

  1. Split input into 2 regimes
  2. if y < -4.00455641920067345e44

    1. Initial program 2.8

      \[x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}\]
    2. Simplified2.8

      \[\leadsto \color{blue}{x + \frac{{\left(\frac{y}{y + z}\right)}^{y}}{y}}\]
    3. Taylor expanded around inf 0.0

      \[\leadsto x + \frac{\color{blue}{e^{-z}}}{y}\]
    4. Using strategy rm
    5. Applied clear-num_binary640.0

      \[\leadsto x + \color{blue}{\frac{1}{\frac{y}{e^{-z}}}}\]
    6. Simplified0.0

      \[\leadsto x + \frac{1}{\color{blue}{y \cdot e^{z}}}\]

    if -4.00455641920067345e44 < y

    1. Initial program 6.8

      \[x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}\]
    2. Simplified6.8

      \[\leadsto \color{blue}{x + \frac{{\left(\frac{y}{y + z}\right)}^{y}}{y}}\]
    3. Using strategy rm
    4. Applied add-cube-cbrt_binary6414.9

      \[\leadsto x + \frac{{\left(\frac{y}{\color{blue}{\left(\sqrt[3]{y + z} \cdot \sqrt[3]{y + z}\right) \cdot \sqrt[3]{y + z}}}\right)}^{y}}{y}\]
    5. Applied add-cube-cbrt_binary646.8

      \[\leadsto x + \frac{{\left(\frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}{\left(\sqrt[3]{y + z} \cdot \sqrt[3]{y + z}\right) \cdot \sqrt[3]{y + z}}\right)}^{y}}{y}\]
    6. Applied times-frac_binary646.8

      \[\leadsto x + \frac{{\color{blue}{\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{y + z} \cdot \sqrt[3]{y + z}} \cdot \frac{\sqrt[3]{y}}{\sqrt[3]{y + z}}\right)}}^{y}}{y}\]
    7. Applied unpow-prod-down_binary641.9

      \[\leadsto x + \frac{\color{blue}{{\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{y + z} \cdot \sqrt[3]{y + z}}\right)}^{y} \cdot {\left(\frac{\sqrt[3]{y}}{\sqrt[3]{y + z}}\right)}^{y}}}{y}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification1.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.0045564192006734 \cdot 10^{+44}:\\ \;\;\;\;x + \frac{1}{y \cdot e^{z}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{{\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{y + z} \cdot \sqrt[3]{y + z}}\right)}^{y} \cdot {\left(\frac{\sqrt[3]{y}}{\sqrt[3]{y + z}}\right)}^{y}}{y}\\ \end{array}\]

Reproduce

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

  :herbie-target
  (if (< (/ y (+ z y)) 7.1154157597908e-315) (+ x (/ (exp (/ -1.0 z)) y)) (+ x (/ (exp (log (pow (/ y (+ y z)) y))) y)))

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