Average Error: 2.7 → 1.9
Time: 15.6s
Precision: 64
\[x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}\]
\[\begin{array}{l} \mathbf{if}\;x + \frac{y}{e^{z} \cdot 1.128379167095512558560699289955664426088 - x \cdot y} \le 1.81311086379084695535968986336471668991 \cdot 10^{290}:\\ \;\;\;\;x + \frac{y}{e^{z} \cdot 1.128379167095512558560699289955664426088 - x \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{1.128379167095512558560699289955664426088 \cdot \left(\left(1 + z\right) \cdot \sqrt[3]{\frac{1}{y}}\right) - \sqrt[3]{y \cdot y} \cdot x} + x\\ \end{array}\]
x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}
\begin{array}{l}
\mathbf{if}\;x + \frac{y}{e^{z} \cdot 1.128379167095512558560699289955664426088 - x \cdot y} \le 1.81311086379084695535968986336471668991 \cdot 10^{290}:\\
\;\;\;\;x + \frac{y}{e^{z} \cdot 1.128379167095512558560699289955664426088 - x \cdot y}\\

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

\end{array}
double f(double x, double y, double z) {
        double r29841686 = x;
        double r29841687 = y;
        double r29841688 = 1.1283791670955126;
        double r29841689 = z;
        double r29841690 = exp(r29841689);
        double r29841691 = r29841688 * r29841690;
        double r29841692 = r29841686 * r29841687;
        double r29841693 = r29841691 - r29841692;
        double r29841694 = r29841687 / r29841693;
        double r29841695 = r29841686 + r29841694;
        return r29841695;
}

double f(double x, double y, double z) {
        double r29841696 = x;
        double r29841697 = y;
        double r29841698 = z;
        double r29841699 = exp(r29841698);
        double r29841700 = 1.1283791670955126;
        double r29841701 = r29841699 * r29841700;
        double r29841702 = r29841696 * r29841697;
        double r29841703 = r29841701 - r29841702;
        double r29841704 = r29841697 / r29841703;
        double r29841705 = r29841696 + r29841704;
        double r29841706 = 1.813110863790847e+290;
        bool r29841707 = r29841705 <= r29841706;
        double r29841708 = cbrt(r29841697);
        double r29841709 = r29841708 * r29841708;
        double r29841710 = 1.0;
        double r29841711 = r29841710 + r29841698;
        double r29841712 = r29841710 / r29841697;
        double r29841713 = cbrt(r29841712);
        double r29841714 = r29841711 * r29841713;
        double r29841715 = r29841700 * r29841714;
        double r29841716 = r29841697 * r29841697;
        double r29841717 = cbrt(r29841716);
        double r29841718 = r29841717 * r29841696;
        double r29841719 = r29841715 - r29841718;
        double r29841720 = r29841709 / r29841719;
        double r29841721 = r29841720 + r29841696;
        double r29841722 = r29841707 ? r29841705 : r29841721;
        return r29841722;
}

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

Original2.7
Target0.0
Herbie1.9
\[x + \frac{1}{\frac{1.128379167095512558560699289955664426088}{y} \cdot e^{z} - x}\]

Derivation

  1. Split input into 2 regimes
  2. if (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))) < 1.813110863790847e+290

    1. Initial program 1.0

      \[x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}\]

    if 1.813110863790847e+290 < (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y))))

    1. Initial program 40.3

      \[x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt40.3

      \[\leadsto x + \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}\]
    4. Applied associate-/l*40.3

      \[\leadsto x + \color{blue}{\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\frac{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}{\sqrt[3]{y}}}}\]
    5. Taylor expanded around 0 47.0

      \[\leadsto x + \frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\color{blue}{\left(1.128379167095512558560699289955664426088 \cdot {\left(\frac{1}{y}\right)}^{\frac{1}{3}} + 1.128379167095512558560699289955664426088 \cdot \left(z \cdot {\left(\frac{1}{y}\right)}^{\frac{1}{3}}\right)\right) - x \cdot {\left({y}^{2}\right)}^{\frac{1}{3}}}}\]
    6. Simplified21.3

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

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

Reproduce

herbie shell --seed 2019171 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"

  :herbie-target
  (+ x (/ 1.0 (- (* (/ 1.1283791670955126 y) (exp z)) x)))

  (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))