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 r63338 = 1.0;
        double r63339 = x;
        double r63340 = 0.253;
        double r63341 = 0.12;
        double r63342 = r63339 * r63341;
        double r63343 = r63340 + r63342;
        double r63344 = r63339 * r63343;
        double r63345 = r63338 - r63344;
        return r63345;
}

double f(double x) {
        double r63346 = 1.0;
        double r63347 = x;
        double r63348 = 0.253;
        double r63349 = r63347 * r63348;
        double r63350 = 2.0;
        double r63351 = pow(r63347, r63350);
        double r63352 = 0.12;
        double r63353 = r63351 * r63352;
        double r63354 = r63349 + r63353;
        double r63355 = r63346 - r63354;
        return r63355;
}

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