Average Error: 0.1 → 0.2
Time: 1.6s
Precision: 64
\[1 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[1 - \left(x \cdot 0.253 + {x}^{2} \cdot 0.12\right)\]
1 - x \cdot \left(0.253 + x \cdot 0.12\right)
1 - \left(x \cdot 0.253 + {x}^{2} \cdot 0.12\right)
double f(double x) {
        double r70238 = 1.0;
        double r70239 = x;
        double r70240 = 0.253;
        double r70241 = 0.12;
        double r70242 = r70239 * r70241;
        double r70243 = r70240 + r70242;
        double r70244 = r70239 * r70243;
        double r70245 = r70238 - r70244;
        return r70245;
}

double f(double x) {
        double r70246 = 1.0;
        double r70247 = x;
        double r70248 = 0.253;
        double r70249 = r70247 * r70248;
        double r70250 = 2.0;
        double r70251 = pow(r70247, r70250);
        double r70252 = 0.12;
        double r70253 = r70251 * r70252;
        double r70254 = r70249 + r70253;
        double r70255 = r70246 - r70254;
        return r70255;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[1 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
  2. Using strategy rm
  3. Applied distribute-lft-in0.1

    \[\leadsto 1 - \color{blue}{\left(x \cdot 0.253 + x \cdot \left(x \cdot 0.12\right)\right)}\]
  4. Using strategy rm
  5. Applied associate-*r*0.2

    \[\leadsto 1 - \left(x \cdot 0.253 + \color{blue}{\left(x \cdot x\right) \cdot 0.12}\right)\]
  6. Simplified0.2

    \[\leadsto 1 - \left(x \cdot 0.253 + \color{blue}{{x}^{2}} \cdot 0.12\right)\]
  7. Final simplification0.2

    \[\leadsto 1 - \left(x \cdot 0.253 + {x}^{2} \cdot 0.12\right)\]

Reproduce

herbie shell --seed 2020060 
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, A"
  :precision binary64
  (- 1 (* x (+ 0.253 (* x 0.12)))))