Average Error: 2.7 → 0.0
Time: 2.4s
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 r398428 = x;
        double r398429 = y;
        double r398430 = 1.1283791670955126;
        double r398431 = z;
        double r398432 = exp(r398431);
        double r398433 = r398430 * r398432;
        double r398434 = r398428 * r398429;
        double r398435 = r398433 - r398434;
        double r398436 = r398429 / r398435;
        double r398437 = r398428 + r398436;
        return r398437;
}

double f(double x, double y, double z) {
        double r398438 = x;
        double r398439 = 1.0;
        double r398440 = sqrt(r398439);
        double r398441 = 1.1283791670955126;
        double r398442 = z;
        double r398443 = exp(r398442);
        double r398444 = y;
        double r398445 = r398443 / r398444;
        double r398446 = r398441 * r398445;
        double r398447 = r398446 - r398438;
        double r398448 = r398440 / r398447;
        double r398449 = r398438 + r398448;
        return r398449;
}

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

Derivation

  1. Initial program 2.7

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

    \[\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.7

    \[\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.7

    \[\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 2020062 
(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)))))