Average Error: 3.1 → 0.1
Time: 3.2s
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 r502215 = x;
        double r502216 = y;
        double r502217 = 1.1283791670955126;
        double r502218 = z;
        double r502219 = exp(r502218);
        double r502220 = r502217 * r502219;
        double r502221 = r502215 * r502216;
        double r502222 = r502220 - r502221;
        double r502223 = r502216 / r502222;
        double r502224 = r502215 + r502223;
        return r502224;
}

double f(double x, double y, double z) {
        double r502225 = x;
        double r502226 = 1.0;
        double r502227 = 1.1283791670955126;
        double r502228 = z;
        double r502229 = exp(r502228);
        double r502230 = y;
        double r502231 = r502229 / r502230;
        double r502232 = r502227 * r502231;
        double r502233 = r502232 - r502225;
        double r502234 = r502226 / r502233;
        double r502235 = r502225 + r502234;
        return r502235;
}

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

Original3.1
Target0.0
Herbie0.1
\[x + \frac{1}{\frac{1.12837916709551256}{y} \cdot e^{z} - x}\]

Derivation

  1. Initial program 3.1

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

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