Average Error: 2.7 → 0.1
Time: 9.5s
Precision: 64
\[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{\frac{e^{z} \cdot 1.1283791670955126}{y} - x}\]
x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}
x + \frac{1}{\frac{e^{z} \cdot 1.1283791670955126}{y} - x}
double f(double x, double y, double z) {
        double r6641874 = x;
        double r6641875 = y;
        double r6641876 = 1.1283791670955126;
        double r6641877 = z;
        double r6641878 = exp(r6641877);
        double r6641879 = r6641876 * r6641878;
        double r6641880 = r6641874 * r6641875;
        double r6641881 = r6641879 - r6641880;
        double r6641882 = r6641875 / r6641881;
        double r6641883 = r6641874 + r6641882;
        return r6641883;
}

double f(double x, double y, double z) {
        double r6641884 = x;
        double r6641885 = 1.0;
        double r6641886 = z;
        double r6641887 = exp(r6641886);
        double r6641888 = 1.1283791670955126;
        double r6641889 = r6641887 * r6641888;
        double r6641890 = y;
        double r6641891 = r6641889 / r6641890;
        double r6641892 = r6641891 - r6641884;
        double r6641893 = r6641885 / r6641892;
        double r6641894 = r6641884 + r6641893;
        return r6641894;
}

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

Derivation

  1. Initial program 2.7

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

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

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

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

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

Reproduce

herbie shell --seed 2019156 +o rules:numerics
(FPCore (x y z)
  :name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"

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

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