Average Error: 2.8 → 0.1
Time: 3.4s
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 r422485 = x;
        double r422486 = y;
        double r422487 = 1.1283791670955126;
        double r422488 = z;
        double r422489 = exp(r422488);
        double r422490 = r422487 * r422489;
        double r422491 = r422485 * r422486;
        double r422492 = r422490 - r422491;
        double r422493 = r422486 / r422492;
        double r422494 = r422485 + r422493;
        return r422494;
}

double f(double x, double y, double z) {
        double r422495 = x;
        double r422496 = 1.0;
        double r422497 = 1.1283791670955126;
        double r422498 = z;
        double r422499 = exp(r422498);
        double r422500 = y;
        double r422501 = r422499 / r422500;
        double r422502 = r422497 * r422501;
        double r422503 = r422502 - r422495;
        double r422504 = r422496 / r422503;
        double r422505 = r422495 + r422504;
        return r422505;
}

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

Derivation

  1. Initial program 2.8

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

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