Average Error: 2.9 → 0.0
Time: 3.0s
Precision: 64
\[x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{1.12837916709551256 \cdot \frac{e^{z}}{y} - \frac{x}{1}}\]
x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}
x + \frac{1}{1.12837916709551256 \cdot \frac{e^{z}}{y} - \frac{x}{1}}
double f(double x, double y, double z) {
        double r501982 = x;
        double r501983 = y;
        double r501984 = 1.1283791670955126;
        double r501985 = z;
        double r501986 = exp(r501985);
        double r501987 = r501984 * r501986;
        double r501988 = r501982 * r501983;
        double r501989 = r501987 - r501988;
        double r501990 = r501983 / r501989;
        double r501991 = r501982 + r501990;
        return r501991;
}

double f(double x, double y, double z) {
        double r501992 = x;
        double r501993 = 1.0;
        double r501994 = 1.1283791670955126;
        double r501995 = z;
        double r501996 = exp(r501995);
        double r501997 = y;
        double r501998 = r501996 / r501997;
        double r501999 = r501994 * r501998;
        double r502000 = r501992 / r501993;
        double r502001 = r501999 - r502000;
        double r502002 = r501993 / r502001;
        double r502003 = r501992 + r502002;
        return r502003;
}

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.12837916709551256}{y} \cdot e^{z} - x}\]

Derivation

  1. Initial program 2.9

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

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

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

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

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

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

Reproduce

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