Average Error: 2.7 → 0.0
Time: 33.5s
Precision: 64
\[x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}\]
\[\frac{1}{\frac{e^{z} \cdot 1.128379167095512558560699289955664426088}{y} - x} + x\]
x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}
\frac{1}{\frac{e^{z} \cdot 1.128379167095512558560699289955664426088}{y} - x} + x
double f(double x, double y, double z) {
        double r17651066 = x;
        double r17651067 = y;
        double r17651068 = 1.1283791670955126;
        double r17651069 = z;
        double r17651070 = exp(r17651069);
        double r17651071 = r17651068 * r17651070;
        double r17651072 = r17651066 * r17651067;
        double r17651073 = r17651071 - r17651072;
        double r17651074 = r17651067 / r17651073;
        double r17651075 = r17651066 + r17651074;
        return r17651075;
}

double f(double x, double y, double z) {
        double r17651076 = 1.0;
        double r17651077 = z;
        double r17651078 = exp(r17651077);
        double r17651079 = 1.1283791670955126;
        double r17651080 = r17651078 * r17651079;
        double r17651081 = y;
        double r17651082 = r17651080 / r17651081;
        double r17651083 = x;
        double r17651084 = r17651082 - r17651083;
        double r17651085 = r17651076 / r17651084;
        double r17651086 = r17651085 + r17651083;
        return r17651086;
}

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.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. Simplified0.0

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

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

Reproduce

herbie shell --seed 2019200 +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)))))