Average Error: 2.5 → 0.1
Time: 2.2s
Precision: 64
\[x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{1.12837916709551256 \cdot \frac{e^{z}}{y} - x}\]
x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}
x + \frac{1}{1.12837916709551256 \cdot \frac{e^{z}}{y} - x}
double f(double x, double y, double z) {
        double r414165 = x;
        double r414166 = y;
        double r414167 = 1.1283791670955126;
        double r414168 = z;
        double r414169 = exp(r414168);
        double r414170 = r414167 * r414169;
        double r414171 = r414165 * r414166;
        double r414172 = r414170 - r414171;
        double r414173 = r414166 / r414172;
        double r414174 = r414165 + r414173;
        return r414174;
}

double f(double x, double y, double z) {
        double r414175 = x;
        double r414176 = 1.0;
        double r414177 = 1.1283791670955126;
        double r414178 = z;
        double r414179 = exp(r414178);
        double r414180 = y;
        double r414181 = r414179 / r414180;
        double r414182 = r414177 * r414181;
        double r414183 = r414182 - r414175;
        double r414184 = r414176 / r414183;
        double r414185 = r414175 + r414184;
        return r414185;
}

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

Derivation

  1. Initial program 2.5

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

    \[\leadsto x + \color{blue}{\frac{1}{\frac{1.12837916709551256 \cdot e^{z} - x \cdot y}{y}}}\]
  4. Taylor expanded around inf 0.1

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

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

Reproduce

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

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

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