Average Error: 0.0 → 0.0
Time: 4.1s
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)\]
\[\frac{0.707110000000000016}{\frac{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}{2.30753 + x \cdot 0.27061000000000002}} + 0.707110000000000016 \cdot \left(-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)
\frac{0.707110000000000016}{\frac{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}{2.30753 + x \cdot 0.27061000000000002}} + 0.707110000000000016 \cdot \left(-x\right)
double f(double x) {
        double r119399 = 0.70711;
        double r119400 = 2.30753;
        double r119401 = x;
        double r119402 = 0.27061;
        double r119403 = r119401 * r119402;
        double r119404 = r119400 + r119403;
        double r119405 = 1.0;
        double r119406 = 0.99229;
        double r119407 = 0.04481;
        double r119408 = r119401 * r119407;
        double r119409 = r119406 + r119408;
        double r119410 = r119401 * r119409;
        double r119411 = r119405 + r119410;
        double r119412 = r119404 / r119411;
        double r119413 = r119412 - r119401;
        double r119414 = r119399 * r119413;
        return r119414;
}

double f(double x) {
        double r119415 = 0.70711;
        double r119416 = 1.0;
        double r119417 = x;
        double r119418 = 0.99229;
        double r119419 = 0.04481;
        double r119420 = r119417 * r119419;
        double r119421 = r119418 + r119420;
        double r119422 = r119417 * r119421;
        double r119423 = r119416 + r119422;
        double r119424 = 2.30753;
        double r119425 = 0.27061;
        double r119426 = r119417 * r119425;
        double r119427 = r119424 + r119426;
        double r119428 = r119423 / r119427;
        double r119429 = r119415 / r119428;
        double r119430 = -r119417;
        double r119431 = r119415 * r119430;
        double r119432 = r119429 + r119431;
        return r119432;
}

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 sub-neg0.0

    \[\leadsto 0.707110000000000016 \cdot \color{blue}{\left(\frac{1}{\frac{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}{2.30753 + x \cdot 0.27061000000000002}} + \left(-x\right)\right)}\]
  6. Applied distribute-lft-in0.0

    \[\leadsto \color{blue}{0.707110000000000016 \cdot \frac{1}{\frac{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}{2.30753 + x \cdot 0.27061000000000002}} + 0.707110000000000016 \cdot \left(-x\right)}\]
  7. Simplified0.0

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

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

Reproduce

herbie shell --seed 2020060 
(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)))