Average Error: 2.6 → 0.0
Time: 11.7s
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 r287946 = x;
        double r287947 = y;
        double r287948 = 1.1283791670955126;
        double r287949 = z;
        double r287950 = exp(r287949);
        double r287951 = r287948 * r287950;
        double r287952 = r287946 * r287947;
        double r287953 = r287951 - r287952;
        double r287954 = r287947 / r287953;
        double r287955 = r287946 + r287954;
        return r287955;
}

double f(double x, double y, double z) {
        double r287956 = x;
        double r287957 = 1.0;
        double r287958 = 1.1283791670955126;
        double r287959 = z;
        double r287960 = exp(r287959);
        double r287961 = y;
        double r287962 = r287960 / r287961;
        double r287963 = r287958 * r287962;
        double r287964 = r287963 - r287956;
        double r287965 = r287957 / r287964;
        double r287966 = r287956 + r287965;
        return r287966;
}

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

Derivation

  1. Initial program 2.6

    \[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.0

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

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

Reproduce

herbie shell --seed 2019212 
(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)))))