Average Error: 0.0 → 0.1
Time: 3.9s
Precision: 64
\[0.707110000000000016 \cdot \left(\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - x\right)\]
\[0.707110000000000016 \cdot \left(\frac{1}{\log \left(e^{\frac{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}{2.30753 + x \cdot 0.27061000000000002}}\right)} - x\right)\]
0.707110000000000016 \cdot \left(\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - x\right)
0.707110000000000016 \cdot \left(\frac{1}{\log \left(e^{\frac{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}{2.30753 + x \cdot 0.27061000000000002}}\right)} - x\right)
double f(double x) {
        double r109381 = 0.70711;
        double r109382 = 2.30753;
        double r109383 = x;
        double r109384 = 0.27061;
        double r109385 = r109383 * r109384;
        double r109386 = r109382 + r109385;
        double r109387 = 1.0;
        double r109388 = 0.99229;
        double r109389 = 0.04481;
        double r109390 = r109383 * r109389;
        double r109391 = r109388 + r109390;
        double r109392 = r109383 * r109391;
        double r109393 = r109387 + r109392;
        double r109394 = r109386 / r109393;
        double r109395 = r109394 - r109383;
        double r109396 = r109381 * r109395;
        return r109396;
}

double f(double x) {
        double r109397 = 0.70711;
        double r109398 = 1.0;
        double r109399 = 1.0;
        double r109400 = x;
        double r109401 = 0.99229;
        double r109402 = 0.04481;
        double r109403 = r109400 * r109402;
        double r109404 = r109401 + r109403;
        double r109405 = r109400 * r109404;
        double r109406 = r109399 + r109405;
        double r109407 = 2.30753;
        double r109408 = 0.27061;
        double r109409 = r109400 * r109408;
        double r109410 = r109407 + r109409;
        double r109411 = r109406 / r109410;
        double r109412 = exp(r109411);
        double r109413 = log(r109412);
        double r109414 = r109398 / r109413;
        double r109415 = r109414 - r109400;
        double r109416 = r109397 * r109415;
        return r109416;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[0.707110000000000016 \cdot \left(\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - x\right)\]
  2. Using strategy rm
  3. Applied clear-num0.0

    \[\leadsto 0.707110000000000016 \cdot \left(\color{blue}{\frac{1}{\frac{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}{2.30753 + x \cdot 0.27061000000000002}}} - x\right)\]
  4. Using strategy rm
  5. Applied add-log-exp0.1

    \[\leadsto 0.707110000000000016 \cdot \left(\frac{1}{\color{blue}{\log \left(e^{\frac{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}{2.30753 + x \cdot 0.27061000000000002}}\right)}} - x\right)\]
  6. Final simplification0.1

    \[\leadsto 0.707110000000000016 \cdot \left(\frac{1}{\log \left(e^{\frac{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}{2.30753 + x \cdot 0.27061000000000002}}\right)} - x\right)\]

Reproduce

herbie shell --seed 2020089 
(FPCore (x)
  :name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, B"
  :precision binary64
  (* 0.70711 (- (/ (+ 2.30753 (* x 0.27061)) (+ 1 (* x (+ 0.99229 (* x 0.04481))))) x)))