Average Error: 2.7 → 0.1
Time: 3.0s
Precision: 64
\[x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{1.128379167095512558560699289955664426088 \cdot \frac{e^{z}}{y} - \frac{x}{1}}\]
x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}
x + \frac{1}{1.128379167095512558560699289955664426088 \cdot \frac{e^{z}}{y} - \frac{x}{1}}
double f(double x, double y, double z) {
        double r408565 = x;
        double r408566 = y;
        double r408567 = 1.1283791670955126;
        double r408568 = z;
        double r408569 = exp(r408568);
        double r408570 = r408567 * r408569;
        double r408571 = r408565 * r408566;
        double r408572 = r408570 - r408571;
        double r408573 = r408566 / r408572;
        double r408574 = r408565 + r408573;
        return r408574;
}

double f(double x, double y, double z) {
        double r408575 = x;
        double r408576 = 1.0;
        double r408577 = 1.1283791670955126;
        double r408578 = z;
        double r408579 = exp(r408578);
        double r408580 = y;
        double r408581 = r408579 / r408580;
        double r408582 = r408577 * r408581;
        double r408583 = r408575 / r408576;
        double r408584 = r408582 - r408583;
        double r408585 = r408576 / r408584;
        double r408586 = r408575 + r408585;
        return r408586;
}

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

Derivation

  1. Initial program 2.7

    \[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. Using strategy rm
  5. Applied div-sub2.7

    \[\leadsto x + \frac{1}{\color{blue}{\frac{1.128379167095512558560699289955664426088 \cdot e^{z}}{y} - \frac{x \cdot y}{y}}}\]
  6. Simplified2.8

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

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

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

Reproduce

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