Average Error: 0.1 → 0.2
Time: 7.4s
Precision: 64
\[1 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[1 - \left(0.12 \cdot {x}^{2} + 0.253 \cdot x\right)\]
1 - x \cdot \left(0.253 + x \cdot 0.12\right)
1 - \left(0.12 \cdot {x}^{2} + 0.253 \cdot x\right)
double f(double x) {
        double r119418 = 1.0;
        double r119419 = x;
        double r119420 = 0.253;
        double r119421 = 0.12;
        double r119422 = r119419 * r119421;
        double r119423 = r119420 + r119422;
        double r119424 = r119419 * r119423;
        double r119425 = r119418 - r119424;
        return r119425;
}

double f(double x) {
        double r119426 = 1.0;
        double r119427 = 0.12;
        double r119428 = x;
        double r119429 = 2.0;
        double r119430 = pow(r119428, r119429);
        double r119431 = r119427 * r119430;
        double r119432 = 0.253;
        double r119433 = r119432 * r119428;
        double r119434 = r119431 + r119433;
        double r119435 = r119426 - r119434;
        return r119435;
}

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 add-cube-cbrt0.4

    \[\leadsto 1 - x \cdot \color{blue}{\left(\left(\sqrt[3]{0.253 + x \cdot 0.12} \cdot \sqrt[3]{0.253 + x \cdot 0.12}\right) \cdot \sqrt[3]{0.253 + x \cdot 0.12}\right)}\]
  4. Applied associate-*r*0.4

    \[\leadsto 1 - \color{blue}{\left(x \cdot \left(\sqrt[3]{0.253 + x \cdot 0.12} \cdot \sqrt[3]{0.253 + x \cdot 0.12}\right)\right) \cdot \sqrt[3]{0.253 + x \cdot 0.12}}\]
  5. Taylor expanded around 0 0.2

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

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

Reproduce

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