Average Error: 0.0 → 0.0
Time: 6.7s
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 r2134537 = 0.70711;
        double r2134538 = 2.30753;
        double r2134539 = x;
        double r2134540 = 0.27061;
        double r2134541 = r2134539 * r2134540;
        double r2134542 = r2134538 + r2134541;
        double r2134543 = 1.0;
        double r2134544 = 0.99229;
        double r2134545 = 0.04481;
        double r2134546 = r2134539 * r2134545;
        double r2134547 = r2134544 + r2134546;
        double r2134548 = r2134539 * r2134547;
        double r2134549 = r2134543 + r2134548;
        double r2134550 = r2134542 / r2134549;
        double r2134551 = r2134550 - r2134539;
        double r2134552 = r2134537 * r2134551;
        return r2134552;
}

double f(double x) {
        double r2134553 = 0.70711;
        double r2134554 = x;
        double r2134555 = -r2134554;
        double r2134556 = r2134553 * r2134555;
        double r2134557 = 0.27061;
        double r2134558 = r2134557 * r2134554;
        double r2134559 = 2.30753;
        double r2134560 = r2134558 + r2134559;
        double r2134561 = 0.04481;
        double r2134562 = r2134554 * r2134561;
        double r2134563 = 0.99229;
        double r2134564 = r2134562 + r2134563;
        double r2134565 = r2134554 * r2134564;
        double r2134566 = 1.0;
        double r2134567 = r2134565 + r2134566;
        double r2134568 = r2134560 / r2134567;
        double r2134569 = r2134553 * r2134568;
        double r2134570 = r2134556 + r2134569;
        return r2134570;
}

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 2019156 
(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)))