Average Error: 2.9 → 0.1
Time: 2.9s
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 r411384 = x;
        double r411385 = y;
        double r411386 = 1.1283791670955126;
        double r411387 = z;
        double r411388 = exp(r411387);
        double r411389 = r411386 * r411388;
        double r411390 = r411384 * r411385;
        double r411391 = r411389 - r411390;
        double r411392 = r411385 / r411391;
        double r411393 = r411384 + r411392;
        return r411393;
}

double f(double x, double y, double z) {
        double r411394 = x;
        double r411395 = 1.0;
        double r411396 = 1.1283791670955126;
        double r411397 = z;
        double r411398 = exp(r411397);
        double r411399 = y;
        double r411400 = r411398 / r411399;
        double r411401 = r411396 * r411400;
        double r411402 = r411401 - r411394;
        double r411403 = r411395 / r411402;
        double r411404 = r411394 + r411403;
        return r411404;
}

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

Derivation

  1. Initial program 2.9

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

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