Average Error: 2.9 → 0.0
Time: 16.5s
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 r17295649 = x;
        double r17295650 = y;
        double r17295651 = 1.1283791670955126;
        double r17295652 = z;
        double r17295653 = exp(r17295652);
        double r17295654 = r17295651 * r17295653;
        double r17295655 = r17295649 * r17295650;
        double r17295656 = r17295654 - r17295655;
        double r17295657 = r17295650 / r17295656;
        double r17295658 = r17295649 + r17295657;
        return r17295658;
}

double f(double x, double y, double z) {
        double r17295659 = x;
        double r17295660 = 1.0;
        double r17295661 = z;
        double r17295662 = exp(r17295661);
        double r17295663 = 1.1283791670955126;
        double r17295664 = r17295662 * r17295663;
        double r17295665 = y;
        double r17295666 = r17295664 / r17295665;
        double r17295667 = r17295666 - r17295659;
        double r17295668 = r17295660 / r17295667;
        double r17295669 = r17295659 + r17295668;
        return r17295669;
}

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 2019172 +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)))))