Average Error: 0.0 → 0.0
Time: 19.9s
Precision: 64
\[0.70711 \cdot \left(\frac{2.30753 + x \cdot 0.27061}{1.0 + x \cdot \left(0.99229 + x \cdot 0.04481\right)} - x\right)\]
\[0.70711 \cdot \left(-x\right) + 0.70711 \cdot \frac{0.27061 \cdot x + 2.30753}{x \cdot \left(x \cdot 0.04481 + 0.99229\right) + 1.0}\]
0.70711 \cdot \left(\frac{2.30753 + x \cdot 0.27061}{1.0 + x \cdot \left(0.99229 + x \cdot 0.04481\right)} - x\right)
0.70711 \cdot \left(-x\right) + 0.70711 \cdot \frac{0.27061 \cdot x + 2.30753}{x \cdot \left(x \cdot 0.04481 + 0.99229\right) + 1.0}
double f(double x) {
        double r6384132 = 0.70711;
        double r6384133 = 2.30753;
        double r6384134 = x;
        double r6384135 = 0.27061;
        double r6384136 = r6384134 * r6384135;
        double r6384137 = r6384133 + r6384136;
        double r6384138 = 1.0;
        double r6384139 = 0.99229;
        double r6384140 = 0.04481;
        double r6384141 = r6384134 * r6384140;
        double r6384142 = r6384139 + r6384141;
        double r6384143 = r6384134 * r6384142;
        double r6384144 = r6384138 + r6384143;
        double r6384145 = r6384137 / r6384144;
        double r6384146 = r6384145 - r6384134;
        double r6384147 = r6384132 * r6384146;
        return r6384147;
}

double f(double x) {
        double r6384148 = 0.70711;
        double r6384149 = x;
        double r6384150 = -r6384149;
        double r6384151 = r6384148 * r6384150;
        double r6384152 = 0.27061;
        double r6384153 = r6384152 * r6384149;
        double r6384154 = 2.30753;
        double r6384155 = r6384153 + r6384154;
        double r6384156 = 0.04481;
        double r6384157 = r6384149 * r6384156;
        double r6384158 = 0.99229;
        double r6384159 = r6384157 + r6384158;
        double r6384160 = r6384149 * r6384159;
        double r6384161 = 1.0;
        double r6384162 = r6384160 + r6384161;
        double r6384163 = r6384155 / r6384162;
        double r6384164 = r6384148 * r6384163;
        double r6384165 = r6384151 + r6384164;
        return r6384165;
}

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.70711 \cdot \left(\frac{2.30753 + x \cdot 0.27061}{1.0 + x \cdot \left(0.99229 + x \cdot 0.04481\right)} - x\right)\]
  2. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto 0.70711 \cdot \color{blue}{\left(\frac{2.30753 + x \cdot 0.27061}{1.0 + x \cdot \left(0.99229 + x \cdot 0.04481\right)} + \left(-x\right)\right)}\]
  4. Applied distribute-rgt-in0.0

    \[\leadsto \color{blue}{\frac{2.30753 + x \cdot 0.27061}{1.0 + x \cdot \left(0.99229 + x \cdot 0.04481\right)} \cdot 0.70711 + \left(-x\right) \cdot 0.70711}\]
  5. Final simplification0.0

    \[\leadsto 0.70711 \cdot \left(-x\right) + 0.70711 \cdot \frac{0.27061 \cdot x + 2.30753}{x \cdot \left(x \cdot 0.04481 + 0.99229\right) + 1.0}\]

Reproduce

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