Average Error: 0.1 → 0.1
Time: 8.6s
Precision: 64
\[1 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[1 - \left(0.253 \cdot x + x \cdot \left(x \cdot 0.12\right)\right)\]
1 - x \cdot \left(0.253 + x \cdot 0.12\right)
1 - \left(0.253 \cdot x + x \cdot \left(x \cdot 0.12\right)\right)
double f(double x) {
        double r79577 = 1.0;
        double r79578 = x;
        double r79579 = 0.253;
        double r79580 = 0.12;
        double r79581 = r79578 * r79580;
        double r79582 = r79579 + r79581;
        double r79583 = r79578 * r79582;
        double r79584 = r79577 - r79583;
        return r79584;
}

double f(double x) {
        double r79585 = 1.0;
        double r79586 = 0.253;
        double r79587 = x;
        double r79588 = r79586 * r79587;
        double r79589 = 0.12;
        double r79590 = r79587 * r79589;
        double r79591 = r79587 * r79590;
        double r79592 = r79588 + r79591;
        double r79593 = r79585 - r79592;
        return r79593;
}

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. Simplified0.1

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

    \[\leadsto 1 - \left(0.253 \cdot x + x \cdot \left(x \cdot 0.12\right)\right)\]

Reproduce

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