Average Error: 2.9 → 0.1
Time: 6.8s
Precision: 64
\[x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{1.128379167095512558560699289955664426088 \cdot \frac{e^{z}}{y} - x}\]
x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}
x + \frac{1}{1.128379167095512558560699289955664426088 \cdot \frac{e^{z}}{y} - x}
double f(double x, double y, double z) {
        double r293571 = x;
        double r293572 = y;
        double r293573 = 1.1283791670955126;
        double r293574 = z;
        double r293575 = exp(r293574);
        double r293576 = r293573 * r293575;
        double r293577 = r293571 * r293572;
        double r293578 = r293576 - r293577;
        double r293579 = r293572 / r293578;
        double r293580 = r293571 + r293579;
        return r293580;
}

double f(double x, double y, double z) {
        double r293581 = x;
        double r293582 = 1.0;
        double r293583 = 1.1283791670955126;
        double r293584 = z;
        double r293585 = exp(r293584);
        double r293586 = y;
        double r293587 = r293585 / r293586;
        double r293588 = r293583 * r293587;
        double r293589 = r293588 - r293581;
        double r293590 = r293582 / r293589;
        double r293591 = r293581 + r293590;
        return r293591;
}

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

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

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

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

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

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

Reproduce

herbie shell --seed 2019297 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (+ x (/ 1 (- (* (/ 1.12837916709551256 y) (exp z)) x)))

  (+ x (/ y (- (* 1.12837916709551256 (exp z)) (* x y)))))