Average Error: 2.6 → 0.0
Time: 14.2s
Precision: 64
\[x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{\frac{e^{z} \cdot 1.128379167095512558560699289955664426088}{y} - x}\]
x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}
x + \frac{1}{\frac{e^{z} \cdot 1.128379167095512558560699289955664426088}{y} - x}
double f(double x, double y, double z) {
        double r17840779 = x;
        double r17840780 = y;
        double r17840781 = 1.1283791670955126;
        double r17840782 = z;
        double r17840783 = exp(r17840782);
        double r17840784 = r17840781 * r17840783;
        double r17840785 = r17840779 * r17840780;
        double r17840786 = r17840784 - r17840785;
        double r17840787 = r17840780 / r17840786;
        double r17840788 = r17840779 + r17840787;
        return r17840788;
}

double f(double x, double y, double z) {
        double r17840789 = x;
        double r17840790 = 1.0;
        double r17840791 = z;
        double r17840792 = exp(r17840791);
        double r17840793 = 1.1283791670955126;
        double r17840794 = r17840792 * r17840793;
        double r17840795 = y;
        double r17840796 = r17840794 / r17840795;
        double r17840797 = r17840796 - r17840789;
        double r17840798 = r17840790 / r17840797;
        double r17840799 = r17840789 + r17840798;
        return r17840799;
}

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.6
Target0.0
Herbie0.0
\[x + \frac{1}{\frac{1.128379167095512558560699289955664426088}{y} \cdot e^{z} - x}\]

Derivation

  1. Initial program 2.6

    \[x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}\]
  2. Using strategy rm
  3. Applied clear-num2.6

    \[\leadsto x + \color{blue}{\frac{1}{\frac{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}{y}}}\]
  4. Using strategy rm
  5. Applied div-sub2.6

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

    \[\leadsto x + \frac{1}{\frac{1.128379167095512558560699289955664426088 \cdot e^{z}}{y} - \color{blue}{x}}\]
  7. Final simplification0.0

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

Reproduce

herbie shell --seed 2019169 +o rules:numerics
(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)))))