Average Error: 2.7 → 0.0
Time: 8.2s
Precision: 64
\[x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{\frac{1.12837916709551256}{y} \cdot e^{z} - x}\]
x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}
x + \frac{1}{\frac{1.12837916709551256}{y} \cdot e^{z} - x}
double f(double x, double y, double z) {
        double r524113 = x;
        double r524114 = y;
        double r524115 = 1.1283791670955126;
        double r524116 = z;
        double r524117 = exp(r524116);
        double r524118 = r524115 * r524117;
        double r524119 = r524113 * r524114;
        double r524120 = r524118 - r524119;
        double r524121 = r524114 / r524120;
        double r524122 = r524113 + r524121;
        return r524122;
}

double f(double x, double y, double z) {
        double r524123 = x;
        double r524124 = 1.0;
        double r524125 = 1.1283791670955126;
        double r524126 = y;
        double r524127 = r524125 / r524126;
        double r524128 = z;
        double r524129 = exp(r524128);
        double r524130 = r524127 * r524129;
        double r524131 = r524130 - r524123;
        double r524132 = r524124 / r524131;
        double r524133 = r524123 + r524132;
        return r524133;
}

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

Derivation

  1. Initial program 2.7

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

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

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

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

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

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

Reproduce

herbie shell --seed 2020046 
(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)))))