Average Error: 2.9 → 0.1
Time: 3.1s
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 r421095 = x;
        double r421096 = y;
        double r421097 = 1.1283791670955126;
        double r421098 = z;
        double r421099 = exp(r421098);
        double r421100 = r421097 * r421099;
        double r421101 = r421095 * r421096;
        double r421102 = r421100 - r421101;
        double r421103 = r421096 / r421102;
        double r421104 = r421095 + r421103;
        return r421104;
}

double f(double x, double y, double z) {
        double r421105 = x;
        double r421106 = 1.0;
        double r421107 = 1.1283791670955126;
        double r421108 = z;
        double r421109 = exp(r421108);
        double r421110 = y;
        double r421111 = r421109 / r421110;
        double r421112 = r421107 * r421111;
        double r421113 = r421105 / r421106;
        double r421114 = r421112 - r421113;
        double r421115 = r421106 / r421114;
        double r421116 = r421105 + r421115;
        return r421116;
}

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.1
\[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.1

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

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

Reproduce

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