Average Error: 2.8 → 0.0
Time: 3.2s
Precision: 64
\[x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}\]
\[x + \frac{\sqrt{1}}{1.12837916709551256 \cdot \frac{e^{z}}{y} - x}\]
x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}
x + \frac{\sqrt{1}}{1.12837916709551256 \cdot \frac{e^{z}}{y} - x}
double f(double x, double y, double z) {
        double r353572 = x;
        double r353573 = y;
        double r353574 = 1.1283791670955126;
        double r353575 = z;
        double r353576 = exp(r353575);
        double r353577 = r353574 * r353576;
        double r353578 = r353572 * r353573;
        double r353579 = r353577 - r353578;
        double r353580 = r353573 / r353579;
        double r353581 = r353572 + r353580;
        return r353581;
}

double f(double x, double y, double z) {
        double r353582 = x;
        double r353583 = 1.0;
        double r353584 = sqrt(r353583);
        double r353585 = 1.1283791670955126;
        double r353586 = z;
        double r353587 = exp(r353586);
        double r353588 = y;
        double r353589 = r353587 / r353588;
        double r353590 = r353585 * r353589;
        double r353591 = r353590 - r353582;
        double r353592 = r353584 / r353591;
        double r353593 = r353582 + r353592;
        return r353593;
}

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.0
\[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 add-sqr-sqrt2.8

    \[\leadsto x + \frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{\frac{1.12837916709551256 \cdot e^{z} - x \cdot y}{y}}\]
  6. Applied associate-/l*2.8

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

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

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

Reproduce

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