Average Error: 2.8 → 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 r498724 = x;
        double r498725 = y;
        double r498726 = 1.1283791670955126;
        double r498727 = z;
        double r498728 = exp(r498727);
        double r498729 = r498726 * r498728;
        double r498730 = r498724 * r498725;
        double r498731 = r498729 - r498730;
        double r498732 = r498725 / r498731;
        double r498733 = r498724 + r498732;
        return r498733;
}

double f(double x, double y, double z) {
        double r498734 = x;
        double r498735 = 1.0;
        double r498736 = 1.1283791670955126;
        double r498737 = z;
        double r498738 = exp(r498737);
        double r498739 = y;
        double r498740 = r498738 / r498739;
        double r498741 = r498736 * r498740;
        double r498742 = r498741 - r498734;
        double r498743 = r498735 / r498742;
        double r498744 = r498734 + r498743;
        return r498744;
}

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.1
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 2020065 
(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)))))