Average Error: 2.7 → 0.1
Time: 3.4s
Precision: 64
\[x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{1.128379167095512558560699289955664426088 \cdot \frac{e^{z}}{y} - \frac{x}{1}}\]
x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}
x + \frac{1}{1.128379167095512558560699289955664426088 \cdot \frac{e^{z}}{y} - \frac{x}{1}}
double f(double x, double y, double z) {
        double r498597 = x;
        double r498598 = y;
        double r498599 = 1.1283791670955126;
        double r498600 = z;
        double r498601 = exp(r498600);
        double r498602 = r498599 * r498601;
        double r498603 = r498597 * r498598;
        double r498604 = r498602 - r498603;
        double r498605 = r498598 / r498604;
        double r498606 = r498597 + r498605;
        return r498606;
}

double f(double x, double y, double z) {
        double r498607 = x;
        double r498608 = 1.0;
        double r498609 = 1.1283791670955126;
        double r498610 = z;
        double r498611 = exp(r498610);
        double r498612 = y;
        double r498613 = r498611 / r498612;
        double r498614 = r498609 * r498613;
        double r498615 = r498607 / r498608;
        double r498616 = r498614 - r498615;
        double r498617 = r498608 / r498616;
        double r498618 = r498607 + r498617;
        return r498618;
}

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

Derivation

  1. Initial program 2.7

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

    \[\leadsto x + \color{blue}{\frac{1}{\frac{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}{y}}}\]
  4. Using strategy rm
  5. Applied div-sub2.7

    \[\leadsto x + \frac{1}{\color{blue}{\frac{1.128379167095512558560699289955664426088 \cdot e^{z}}{y} - \frac{x \cdot y}{y}}}\]
  6. Simplified2.8

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

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

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

Reproduce

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