Average Error: 2.8 → 0.1
Time: 3.5s
Precision: 64
\[x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{1.12837916709551256 \cdot \frac{e^{z}}{y} - \frac{x}{1}}\]
x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}
x + \frac{1}{1.12837916709551256 \cdot \frac{e^{z}}{y} - \frac{x}{1}}
double f(double x, double y, double z) {
        double r378842 = x;
        double r378843 = y;
        double r378844 = 1.1283791670955126;
        double r378845 = z;
        double r378846 = exp(r378845);
        double r378847 = r378844 * r378846;
        double r378848 = r378842 * r378843;
        double r378849 = r378847 - r378848;
        double r378850 = r378843 / r378849;
        double r378851 = r378842 + r378850;
        return r378851;
}

double f(double x, double y, double z) {
        double r378852 = x;
        double r378853 = 1.0;
        double r378854 = 1.1283791670955126;
        double r378855 = z;
        double r378856 = exp(r378855);
        double r378857 = y;
        double r378858 = r378856 / r378857;
        double r378859 = r378854 * r378858;
        double r378860 = r378852 / r378853;
        double r378861 = r378859 - r378860;
        double r378862 = r378853 / r378861;
        double r378863 = r378852 + r378862;
        return r378863;
}

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}{\frac{x}{1}}}\]
  8. Final simplification0.1

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

Reproduce

herbie shell --seed 2020100 
(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)))))