Average Error: 2.7 → 0.1
Time: 3.1s
Precision: 64
\[x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{1.128379167095512558560699289955664426088 \cdot \frac{e^{z}}{y} - x}\]
x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}
x + \frac{1}{1.128379167095512558560699289955664426088 \cdot \frac{e^{z}}{y} - x}
double f(double x, double y, double z) {
        double r361382 = x;
        double r361383 = y;
        double r361384 = 1.1283791670955126;
        double r361385 = z;
        double r361386 = exp(r361385);
        double r361387 = r361384 * r361386;
        double r361388 = r361382 * r361383;
        double r361389 = r361387 - r361388;
        double r361390 = r361383 / r361389;
        double r361391 = r361382 + r361390;
        return r361391;
}

double f(double x, double y, double z) {
        double r361392 = x;
        double r361393 = 1.0;
        double r361394 = 1.1283791670955126;
        double r361395 = z;
        double r361396 = exp(r361395);
        double r361397 = y;
        double r361398 = r361396 / r361397;
        double r361399 = r361394 * r361398;
        double r361400 = r361399 - r361392;
        double r361401 = r361393 / r361400;
        double r361402 = r361392 + r361401;
        return r361402;
}

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

Derivation

  1. Initial program 2.7

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

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

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

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

Reproduce

herbie shell --seed 2020001 +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)))))