Average Error: 3.0 → 0.1
Time: 9.2s
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 r236750 = x;
        double r236751 = y;
        double r236752 = 1.1283791670955126;
        double r236753 = z;
        double r236754 = exp(r236753);
        double r236755 = r236752 * r236754;
        double r236756 = r236750 * r236751;
        double r236757 = r236755 - r236756;
        double r236758 = r236751 / r236757;
        double r236759 = r236750 + r236758;
        return r236759;
}

double f(double x, double y, double z) {
        double r236760 = x;
        double r236761 = 1.0;
        double r236762 = 1.1283791670955126;
        double r236763 = z;
        double r236764 = exp(r236763);
        double r236765 = y;
        double r236766 = r236764 / r236765;
        double r236767 = r236762 * r236766;
        double r236768 = r236767 - r236760;
        double r236769 = r236761 / r236768;
        double r236770 = r236760 + r236769;
        return r236770;
}

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

Original3.0
Target0.1
Herbie0.1
\[x + \frac{1}{\frac{1.128379167095512558560699289955664426088}{y} \cdot e^{z} - x}\]

Derivation

  1. Initial program 3.0

    \[x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}\]
  2. Taylor expanded around inf 3.0

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

    \[\leadsto x + \frac{y}{\color{blue}{\mathsf{fma}\left(y, -x, 1.128379167095512558560699289955664426088 \cdot e^{z}\right)}}\]
  4. Using strategy rm
  5. Applied clear-num2.0

    \[\leadsto x + \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, -x, 1.128379167095512558560699289955664426088 \cdot e^{z}\right)}{y}}}\]
  6. Taylor expanded around inf 0.1

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

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

Reproduce

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