Average Error: 3.4 → 0.1
Time: 11.5s
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 r23194643 = x;
        double r23194644 = y;
        double r23194645 = 1.1283791670955126;
        double r23194646 = z;
        double r23194647 = exp(r23194646);
        double r23194648 = r23194645 * r23194647;
        double r23194649 = r23194643 * r23194644;
        double r23194650 = r23194648 - r23194649;
        double r23194651 = r23194644 / r23194650;
        double r23194652 = r23194643 + r23194651;
        return r23194652;
}

double f(double x, double y, double z) {
        double r23194653 = x;
        double r23194654 = 1.0;
        double r23194655 = 1.1283791670955126;
        double r23194656 = z;
        double r23194657 = exp(r23194656);
        double r23194658 = y;
        double r23194659 = r23194657 / r23194658;
        double r23194660 = r23194655 * r23194659;
        double r23194661 = r23194660 - r23194653;
        double r23194662 = r23194654 / r23194661;
        double r23194663 = r23194653 + r23194662;
        return r23194663;
}

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

Derivation

  1. Initial program 3.4

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

    \[\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 2019174 +o rules:numerics
(FPCore (x y z)
  :name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"

  :herbie-target
  (+ x (/ 1.0 (- (* (/ 1.1283791670955126 y) (exp z)) x)))

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