Average Error: 2.9 → 0.0
Time: 15.8s
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 r14318255 = x;
        double r14318256 = y;
        double r14318257 = 1.1283791670955126;
        double r14318258 = z;
        double r14318259 = exp(r14318258);
        double r14318260 = r14318257 * r14318259;
        double r14318261 = r14318255 * r14318256;
        double r14318262 = r14318260 - r14318261;
        double r14318263 = r14318256 / r14318262;
        double r14318264 = r14318255 + r14318263;
        return r14318264;
}

double f(double x, double y, double z) {
        double r14318265 = x;
        double r14318266 = 1.0;
        double r14318267 = z;
        double r14318268 = exp(r14318267);
        double r14318269 = 1.1283791670955126;
        double r14318270 = r14318268 * r14318269;
        double r14318271 = y;
        double r14318272 = r14318270 / r14318271;
        double r14318273 = r14318272 - r14318265;
        double r14318274 = r14318266 / r14318273;
        double r14318275 = r14318265 + r14318274;
        return r14318275;
}

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