Average Error: 2.5 → 0.1
Time: 2.3s
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 r432376 = x;
        double r432377 = y;
        double r432378 = 1.1283791670955126;
        double r432379 = z;
        double r432380 = exp(r432379);
        double r432381 = r432378 * r432380;
        double r432382 = r432376 * r432377;
        double r432383 = r432381 - r432382;
        double r432384 = r432377 / r432383;
        double r432385 = r432376 + r432384;
        return r432385;
}

double f(double x, double y, double z) {
        double r432386 = x;
        double r432387 = 1.0;
        double r432388 = 1.1283791670955126;
        double r432389 = z;
        double r432390 = exp(r432389);
        double r432391 = y;
        double r432392 = r432390 / r432391;
        double r432393 = r432388 * r432392;
        double r432394 = r432393 - r432386;
        double r432395 = r432387 / r432394;
        double r432396 = r432386 + r432395;
        return r432396;
}

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.0
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.6

    \[\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 2020060 +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)))))