Average Error: 6.0 → 1.3
Time: 7.9s
Precision: binary64
\[x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}\]
\[\begin{array}{l} \mathbf{if}\;y \le -2.9249215934424851 \cdot 10^{-98} \lor \neg \left(y \le 3.3078756336057208 \cdot 10^{-210}\right):\\ \;\;\;\;\frac{{\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{z + y} \cdot \sqrt[3]{z + y}}\right)}^{y} \cdot {\left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)}^{y}}{y} + x\\ \mathbf{else}:\\ \;\;\;\;\left(x + \frac{{\left(e^{y}\right)}^{\left(\log y - \log z\right)}}{y}\right) - \frac{{\left(e^{y}\right)}^{\left(\log y - \log z\right)}}{\frac{z}{y}}\\ \end{array}\]
x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}
\begin{array}{l}
\mathbf{if}\;y \le -2.9249215934424851 \cdot 10^{-98} \lor \neg \left(y \le 3.3078756336057208 \cdot 10^{-210}\right):\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{z + y} \cdot \sqrt[3]{z + y}}\right)}^{y} \cdot {\left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)}^{y}}{y} + x\\

\mathbf{else}:\\
\;\;\;\;\left(x + \frac{{\left(e^{y}\right)}^{\left(\log y - \log z\right)}}{y}\right) - \frac{{\left(e^{y}\right)}^{\left(\log y - \log z\right)}}{\frac{z}{y}}\\

\end{array}
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 VAR;
	if (((y <= -2.924921593442485e-98) || !(y <= 3.307875633605721e-210))) {
		VAR = ((double) ((((double) (((double) pow((((double) (((double) cbrt(y)) * ((double) cbrt(y)))) / ((double) (((double) cbrt(((double) (z + y)))) * ((double) cbrt(((double) (z + y))))))), y)) * ((double) pow((((double) cbrt(y)) / ((double) cbrt(((double) (z + y))))), y)))) / y) + x));
	} else {
		VAR = ((double) (((double) (x + (((double) pow(((double) exp(y)), ((double) (((double) log(y)) - ((double) log(z)))))) / y))) - (((double) pow(((double) exp(y)), ((double) (((double) log(y)) - ((double) log(z)))))) / (z / y))));
	}
	return VAR;
}

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

Original6.0
Target1.0
Herbie1.3
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z + y} \lt 7.1154157598 \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 < -2.9249215934424851e-98 or 3.3078756336057208e-210 < y

    1. Initial program 2.8

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{{\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{z + y} \cdot \sqrt[3]{z + y}}\right)}^{y} \cdot {\left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)}^{y}}}{y} + x\]

    if -2.9249215934424851e-98 < y < 3.3078756336057208e-210

    1. Initial program 17.2

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

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

      \[\leadsto \color{blue}{\left(\frac{e^{\left(\log y + \log \left(\frac{1}{z}\right)\right) \cdot y}}{y} + x\right) - \frac{y \cdot e^{\left(\log y + \log \left(\frac{1}{z}\right)\right) \cdot y}}{z}}\]
    4. Simplified1.1

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \le -2.9249215934424851 \cdot 10^{-98} \lor \neg \left(y \le 3.3078756336057208 \cdot 10^{-210}\right):\\ \;\;\;\;\frac{{\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{z + y} \cdot \sqrt[3]{z + y}}\right)}^{y} \cdot {\left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)}^{y}}{y} + x\\ \mathbf{else}:\\ \;\;\;\;\left(x + \frac{{\left(e^{y}\right)}^{\left(\log y - \log z\right)}}{y}\right) - \frac{{\left(e^{y}\right)}^{\left(\log y - \log z\right)}}{\frac{z}{y}}\\ \end{array}\]

Reproduce

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