Average Error: 0.0 → 0.0
Time: 3.3s
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 \cdot \left(2.30753 + x \cdot 0.27061000000000002\right)}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} + 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 \cdot \left(2.30753 + x \cdot 0.27061000000000002\right)}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} + 0.707110000000000016 \cdot \left(-x\right)
double f(double x) {
        double r100186 = 0.70711;
        double r100187 = 2.30753;
        double r100188 = x;
        double r100189 = 0.27061;
        double r100190 = r100188 * r100189;
        double r100191 = r100187 + r100190;
        double r100192 = 1.0;
        double r100193 = 0.99229;
        double r100194 = 0.04481;
        double r100195 = r100188 * r100194;
        double r100196 = r100193 + r100195;
        double r100197 = r100188 * r100196;
        double r100198 = r100192 + r100197;
        double r100199 = r100191 / r100198;
        double r100200 = r100199 - r100188;
        double r100201 = r100186 * r100200;
        return r100201;
}

double f(double x) {
        double r100202 = 0.70711;
        double r100203 = 2.30753;
        double r100204 = x;
        double r100205 = 0.27061;
        double r100206 = r100204 * r100205;
        double r100207 = r100203 + r100206;
        double r100208 = r100202 * r100207;
        double r100209 = 1.0;
        double r100210 = 0.99229;
        double r100211 = 0.04481;
        double r100212 = r100204 * r100211;
        double r100213 = r100210 + r100212;
        double r100214 = r100204 * r100213;
        double r100215 = r100209 + r100214;
        double r100216 = r100208 / r100215;
        double r100217 = -r100204;
        double r100218 = r100202 * r100217;
        double r100219 = r100216 + r100218;
        return r100219;
}

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 div-inv0.0

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

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

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

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

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

Reproduce

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