Average Error: 2.6 → 0.0
Time: 8.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 r358150 = x;
        double r358151 = y;
        double r358152 = 1.1283791670955126;
        double r358153 = z;
        double r358154 = exp(r358153);
        double r358155 = r358152 * r358154;
        double r358156 = r358150 * r358151;
        double r358157 = r358155 - r358156;
        double r358158 = r358151 / r358157;
        double r358159 = r358150 + r358158;
        return r358159;
}

double f(double x, double y, double z) {
        double r358160 = x;
        double r358161 = 1.0;
        double r358162 = 1.1283791670955126;
        double r358163 = z;
        double r358164 = exp(r358163);
        double r358165 = y;
        double r358166 = r358164 / r358165;
        double r358167 = r358162 * r358166;
        double r358168 = r358167 - r358160;
        double r358169 = r358161 / r358168;
        double r358170 = r358160 + r358169;
        return r358170;
}

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. Taylor expanded around inf 2.6

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

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

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

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

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

Reproduce

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