Average Error: 2.8 → 0.1
Time: 9.7s
Precision: 64
\[x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{\frac{1.128379167095512558560699289955664426088 \cdot e^{z}}{y} - x}\]
x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}
x + \frac{1}{\frac{1.128379167095512558560699289955664426088 \cdot e^{z}}{y} - x}
double f(double x, double y, double z) {
        double r320655 = x;
        double r320656 = y;
        double r320657 = 1.1283791670955126;
        double r320658 = z;
        double r320659 = exp(r320658);
        double r320660 = r320657 * r320659;
        double r320661 = r320655 * r320656;
        double r320662 = r320660 - r320661;
        double r320663 = r320656 / r320662;
        double r320664 = r320655 + r320663;
        return r320664;
}

double f(double x, double y, double z) {
        double r320665 = x;
        double r320666 = 1.0;
        double r320667 = 1.1283791670955126;
        double r320668 = z;
        double r320669 = exp(r320668);
        double r320670 = r320667 * r320669;
        double r320671 = y;
        double r320672 = r320670 / r320671;
        double r320673 = r320672 - r320665;
        double r320674 = r320666 / r320673;
        double r320675 = r320665 + r320674;
        return r320675;
}

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.8
Target0.1
Herbie0.1
\[x + \frac{1}{\frac{1.128379167095512558560699289955664426088}{y} \cdot e^{z} - x}\]

Derivation

  1. Initial program 2.8

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

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

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

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

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

Reproduce

herbie shell --seed 2019235 +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.12837916709551256 y) (exp z)) x)))

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