Average Error: 2.9 → 0.1
Time: 12.3s
Precision: 64
\[x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{\left(1.12837916709551256 \cdot e^{z}\right) \cdot \frac{1}{y} - x}\]
x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}
x + \frac{1}{\left(1.12837916709551256 \cdot e^{z}\right) \cdot \frac{1}{y} - x}
double f(double x, double y, double z) {
        double r1158722 = x;
        double r1158723 = y;
        double r1158724 = 1.1283791670955126;
        double r1158725 = z;
        double r1158726 = exp(r1158725);
        double r1158727 = r1158724 * r1158726;
        double r1158728 = r1158722 * r1158723;
        double r1158729 = r1158727 - r1158728;
        double r1158730 = r1158723 / r1158729;
        double r1158731 = r1158722 + r1158730;
        return r1158731;
}

double f(double x, double y, double z) {
        double r1158732 = x;
        double r1158733 = 1.0;
        double r1158734 = 1.1283791670955126;
        double r1158735 = z;
        double r1158736 = exp(r1158735);
        double r1158737 = r1158734 * r1158736;
        double r1158738 = y;
        double r1158739 = r1158733 / r1158738;
        double r1158740 = r1158737 * r1158739;
        double r1158741 = r1158740 - r1158732;
        double r1158742 = r1158733 / r1158741;
        double r1158743 = r1158732 + r1158742;
        return r1158743;
}

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

Derivation

  1. Initial program 2.9

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

    \[\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. Using strategy rm
  6. Applied div-inv0.1

    \[\leadsto x + \frac{1}{1.12837916709551256 \cdot \color{blue}{\left(e^{z} \cdot \frac{1}{y}\right)} - x}\]
  7. Applied associate-*r*0.1

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

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

Reproduce

herbie shell --seed 2019198 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"

  :herbie-target
  (+ x (/ 1.0 (- (* (/ 1.1283791670955126 y) (exp z)) x)))

  (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))