Average Error: 2.9 → 0.0
Time: 23.3s
Precision: 64
\[x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{\frac{e^{z} \cdot 1.128379167095512558560699289955664426088}{y} - x}\]
x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}
x + \frac{1}{\frac{e^{z} \cdot 1.128379167095512558560699289955664426088}{y} - x}
double f(double x, double y, double z) {
        double r15203365 = x;
        double r15203366 = y;
        double r15203367 = 1.1283791670955126;
        double r15203368 = z;
        double r15203369 = exp(r15203368);
        double r15203370 = r15203367 * r15203369;
        double r15203371 = r15203365 * r15203366;
        double r15203372 = r15203370 - r15203371;
        double r15203373 = r15203366 / r15203372;
        double r15203374 = r15203365 + r15203373;
        return r15203374;
}

double f(double x, double y, double z) {
        double r15203375 = x;
        double r15203376 = 1.0;
        double r15203377 = z;
        double r15203378 = exp(r15203377);
        double r15203379 = 1.1283791670955126;
        double r15203380 = r15203378 * r15203379;
        double r15203381 = y;
        double r15203382 = r15203380 / r15203381;
        double r15203383 = r15203382 - r15203375;
        double r15203384 = r15203376 / r15203383;
        double r15203385 = r15203375 + r15203384;
        return r15203385;
}

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

Derivation

  1. Initial program 2.9

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

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

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

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

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

Reproduce

herbie shell --seed 2019168 +o rules:numerics
(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)))))