Average Error: 2.8 → 0.1
Time: 3.6s
Precision: 64
\[x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{1.12837916709551256 \cdot \frac{e^{z}}{y} - x}\]
x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}
x + \frac{1}{1.12837916709551256 \cdot \frac{e^{z}}{y} - x}
double f(double x, double y, double z) {
        double r590787 = x;
        double r590788 = y;
        double r590789 = 1.1283791670955126;
        double r590790 = z;
        double r590791 = exp(r590790);
        double r590792 = r590789 * r590791;
        double r590793 = r590787 * r590788;
        double r590794 = r590792 - r590793;
        double r590795 = r590788 / r590794;
        double r590796 = r590787 + r590795;
        return r590796;
}

double f(double x, double y, double z) {
        double r590797 = x;
        double r590798 = 1.0;
        double r590799 = 1.1283791670955126;
        double r590800 = z;
        double r590801 = exp(r590800);
        double r590802 = y;
        double r590803 = r590801 / r590802;
        double r590804 = r590799 * r590803;
        double r590805 = r590804 - r590797;
        double r590806 = r590798 / r590805;
        double r590807 = r590797 + r590806;
        return r590807;
}

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

Derivation

  1. Initial program 2.8

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

    \[\leadsto x + \color{blue}{\frac{1}{\frac{1.12837916709551256 \cdot e^{z} - x \cdot y}{y}}}\]
  4. Taylor expanded around inf 0.1

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

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

Reproduce

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