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 r440441 = x;
        double r440442 = y;
        double r440443 = 1.1283791670955126;
        double r440444 = z;
        double r440445 = exp(r440444);
        double r440446 = r440443 * r440445;
        double r440447 = r440441 * r440442;
        double r440448 = r440446 - r440447;
        double r440449 = r440442 / r440448;
        double r440450 = r440441 + r440449;
        return r440450;
}

double f(double x, double y, double z) {
        double r440451 = x;
        double r440452 = 1.0;
        double r440453 = 1.1283791670955126;
        double r440454 = z;
        double r440455 = exp(r440454);
        double r440456 = y;
        double r440457 = r440455 / r440456;
        double r440458 = r440453 * r440457;
        double r440459 = r440458 - r440451;
        double r440460 = r440452 / r440459;
        double r440461 = r440451 + r440460;
        return r440461;
}

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 
(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)))))