Average Error: 2.7 → 0.1
Time: 3.1s
Precision: 64
\[x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}\]
\[x + \frac{\sqrt{1}}{1.12837916709551256 \cdot \frac{e^{z}}{y} - x}\]
x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}
x + \frac{\sqrt{1}}{1.12837916709551256 \cdot \frac{e^{z}}{y} - x}
double f(double x, double y, double z) {
        double r379882 = x;
        double r379883 = y;
        double r379884 = 1.1283791670955126;
        double r379885 = z;
        double r379886 = exp(r379885);
        double r379887 = r379884 * r379886;
        double r379888 = r379882 * r379883;
        double r379889 = r379887 - r379888;
        double r379890 = r379883 / r379889;
        double r379891 = r379882 + r379890;
        return r379891;
}

double f(double x, double y, double z) {
        double r379892 = x;
        double r379893 = 1.0;
        double r379894 = sqrt(r379893);
        double r379895 = 1.1283791670955126;
        double r379896 = z;
        double r379897 = exp(r379896);
        double r379898 = y;
        double r379899 = r379897 / r379898;
        double r379900 = r379895 * r379899;
        double r379901 = r379900 - r379892;
        double r379902 = r379894 / r379901;
        double r379903 = r379892 + r379902;
        return r379903;
}

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.12837916709551256}{y} \cdot e^{z} - x}\]

Derivation

  1. Initial program 2.7

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

    \[\leadsto x + \color{blue}{\frac{1}{\frac{1.12837916709551256 \cdot e^{z} - x \cdot y}{y}}}\]
  4. Using strategy rm
  5. Applied add-sqr-sqrt2.7

    \[\leadsto x + \frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{\frac{1.12837916709551256 \cdot e^{z} - x \cdot y}{y}}\]
  6. Applied associate-/l*2.7

    \[\leadsto x + \color{blue}{\frac{\sqrt{1}}{\frac{\frac{1.12837916709551256 \cdot e^{z} - x \cdot y}{y}}{\sqrt{1}}}}\]
  7. Simplified0.1

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

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

Reproduce

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