Average Error: 2.8 → 0.1
Time: 4.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 r547378 = x;
        double r547379 = y;
        double r547380 = 1.1283791670955126;
        double r547381 = z;
        double r547382 = exp(r547381);
        double r547383 = r547380 * r547382;
        double r547384 = r547378 * r547379;
        double r547385 = r547383 - r547384;
        double r547386 = r547379 / r547385;
        double r547387 = r547378 + r547386;
        return r547387;
}

double f(double x, double y, double z) {
        double r547388 = x;
        double r547389 = 1.0;
        double r547390 = 1.1283791670955126;
        double r547391 = z;
        double r547392 = exp(r547391);
        double r547393 = y;
        double r547394 = r547392 / r547393;
        double r547395 = r547390 * r547394;
        double r547396 = r547395 - r547388;
        double r547397 = r547389 / r547396;
        double r547398 = r547388 + r547397;
        return r547398;
}

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. Using strategy rm
  5. Applied div-sub2.8

    \[\leadsto x + \frac{1}{\color{blue}{\frac{1.12837916709551256 \cdot e^{z}}{y} - \frac{x \cdot y}{y}}}\]
  6. Simplified2.8

    \[\leadsto x + \frac{1}{\color{blue}{1.12837916709551256 \cdot \frac{e^{z}}{y}} - \frac{x \cdot y}{y}}\]
  7. Simplified0.1

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

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

Reproduce

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