Average Error: 6.4 → 1.3
Time: 7.8s
Precision: binary64
\[x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}\]
\[x + \frac{e^{y \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{y + z}}\right)\right)}}{y}\]
x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}
x + \frac{e^{y \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{y + z}}\right)\right)}}{y}
(FPCore (x y z)
 :precision binary64
 (+ x (/ (exp (* y (log (/ y (+ z y))))) y)))
(FPCore (x y z)
 :precision binary64
 (+ x (/ (exp (* y (* 2.0 (log (/ (cbrt y) (cbrt (+ y z))))))) y)))
double code(double x, double y, double z) {
	return x + (exp(y * log(y / (z + y))) / y);
}
double code(double x, double y, double z) {
	return x + (exp(y * (2.0 * log(cbrt(y) / cbrt(y + z)))) / y);
}

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.4
Target1.1
Herbie1.3
\[\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. Initial program 6.4

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

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

    \[\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.5

    \[\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.5

    \[\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_binary642.2

    \[\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}\]
  8. Simplified2.2

    \[\leadsto x + \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]{y + z}}\right)}^{y}}{y}\]
  9. Simplified2.2

    \[\leadsto x + \frac{{\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{z + y} \cdot \sqrt[3]{z + y}}\right)}^{y} \cdot \color{blue}{{\left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)}^{y}}}{y}\]
  10. Using strategy rm
  11. Applied pow-to-exp_binary642.2

    \[\leadsto x + \frac{\color{blue}{e^{\log \left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{z + y} \cdot \sqrt[3]{z + y}}\right) \cdot y}} \cdot {\left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)}^{y}}{y}\]
  12. Simplified1.2

    \[\leadsto x + \frac{e^{\color{blue}{y \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)\right)}} \cdot {\left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)}^{y}}{y}\]
  13. Taylor expanded around 0 1.3

    \[\leadsto x + \frac{e^{y \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)\right)} \cdot \color{blue}{1}}{y}\]
  14. Final simplification1.3

    \[\leadsto x + \frac{e^{y \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{y + z}}\right)\right)}}{y}\]

Reproduce

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