Average Error: 2.7 → 0.1
Time: 3.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 r365123 = x;
        double r365124 = y;
        double r365125 = 1.1283791670955126;
        double r365126 = z;
        double r365127 = exp(r365126);
        double r365128 = r365125 * r365127;
        double r365129 = r365123 * r365124;
        double r365130 = r365128 - r365129;
        double r365131 = r365124 / r365130;
        double r365132 = r365123 + r365131;
        return r365132;
}

double f(double x, double y, double z) {
        double r365133 = x;
        double r365134 = 1.0;
        double r365135 = 1.1283791670955126;
        double r365136 = z;
        double r365137 = exp(r365136);
        double r365138 = y;
        double r365139 = r365137 / r365138;
        double r365140 = r365135 * r365139;
        double r365141 = r365140 - r365133;
        double r365142 = r365134 / r365141;
        double r365143 = r365133 + r365142;
        return r365143;
}

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

Derivation

  1. Initial program 2.7

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

    \[\leadsto x + \color{blue}{\frac{1}{\frac{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}{y}}}\]
  4. Taylor expanded around inf 0.1

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

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

Reproduce

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