Average Error: 2.9 → 0.0
Time: 12.5s
Precision: 64
\[x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{e^{z} \cdot \frac{1.128379167095512558560699289955664426088}{y} - x}\]
x + \frac{y}{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}
x + \frac{1}{e^{z} \cdot \frac{1.128379167095512558560699289955664426088}{y} - x}
double f(double x, double y, double z) {
        double r15195351 = x;
        double r15195352 = y;
        double r15195353 = 1.1283791670955126;
        double r15195354 = z;
        double r15195355 = exp(r15195354);
        double r15195356 = r15195353 * r15195355;
        double r15195357 = r15195351 * r15195352;
        double r15195358 = r15195356 - r15195357;
        double r15195359 = r15195352 / r15195358;
        double r15195360 = r15195351 + r15195359;
        return r15195360;
}

double f(double x, double y, double z) {
        double r15195361 = x;
        double r15195362 = 1.0;
        double r15195363 = z;
        double r15195364 = exp(r15195363);
        double r15195365 = 1.1283791670955126;
        double r15195366 = y;
        double r15195367 = r15195365 / r15195366;
        double r15195368 = r15195364 * r15195367;
        double r15195369 = r15195368 - r15195361;
        double r15195370 = r15195362 / r15195369;
        double r15195371 = r15195361 + r15195370;
        return r15195371;
}

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

Derivation

  1. Initial program 2.9

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

    \[\leadsto x + \color{blue}{\frac{1}{\frac{1.128379167095512558560699289955664426088 \cdot e^{z} - x \cdot y}{y}}}\]
  4. Using strategy rm
  5. Applied clear-num2.9

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

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

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

Reproduce

herbie shell --seed 2019172 +o rules:numerics
(FPCore (x y z)
  :name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"

  :herbie-target
  (+ x (/ 1.0 (- (* (/ 1.1283791670955126 y) (exp z)) x)))

  (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))