Average Error: 3.4 → 0.1
Time: 12.7s
Precision: 64
\[x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{\frac{e^{z}}{y} \cdot 1.128379167095512558560699289955664426088 - x}\]
x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}
x + \frac{1}{\frac{e^{z}}{y} \cdot 1.128379167095512558560699289955664426088 - x}
double f(double x, double y, double z) {
        double r19109565 = x;
        double r19109566 = y;
        double r19109567 = 1.1283791670955126;
        double r19109568 = z;
        double r19109569 = exp(r19109568);
        double r19109570 = r19109567 * r19109569;
        double r19109571 = r19109565 * r19109566;
        double r19109572 = r19109570 - r19109571;
        double r19109573 = r19109566 / r19109572;
        double r19109574 = r19109565 + r19109573;
        return r19109574;
}

double f(double x, double y, double z) {
        double r19109575 = x;
        double r19109576 = 1.0;
        double r19109577 = z;
        double r19109578 = exp(r19109577);
        double r19109579 = y;
        double r19109580 = r19109578 / r19109579;
        double r19109581 = 1.1283791670955126;
        double r19109582 = r19109580 * r19109581;
        double r19109583 = r19109582 - r19109575;
        double r19109584 = r19109576 / r19109583;
        double r19109585 = r19109575 + r19109584;
        return r19109585;
}

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}{\frac{e^{z}}{y} \cdot 1.128379167095512558560699289955664426088 - 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)))))