Average Error: 0.1 → 0.2
Time: 2.0s
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 r104522 = 1.0;
        double r104523 = x;
        double r104524 = 0.253;
        double r104525 = 0.12;
        double r104526 = r104523 * r104525;
        double r104527 = r104524 + r104526;
        double r104528 = r104523 * r104527;
        double r104529 = r104522 - r104528;
        return r104529;
}

double f(double x) {
        double r104530 = 1.0;
        double r104531 = x;
        double r104532 = 0.253;
        double r104533 = r104531 * r104532;
        double r104534 = 2.0;
        double r104535 = pow(r104531, r104534);
        double r104536 = 0.12;
        double r104537 = r104535 * r104536;
        double r104538 = r104533 + r104537;
        double r104539 = r104530 - r104538;
        return r104539;
}

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 2020057 
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, A"
  :precision binary64
  (- 1 (* x (+ 0.253 (* x 0.12)))))