Average Error: 0.1 → 0.1
Time: 2.4s
Precision: 64
\[1 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[1 - \left(x \cdot 0.253 + x \cdot \left(x \cdot 0.12\right)\right)\]
1 - x \cdot \left(0.253 + x \cdot 0.12\right)
1 - \left(x \cdot 0.253 + x \cdot \left(x \cdot 0.12\right)\right)
double f(double x) {
        double r152618 = 1.0;
        double r152619 = x;
        double r152620 = 0.253;
        double r152621 = 0.12;
        double r152622 = r152619 * r152621;
        double r152623 = r152620 + r152622;
        double r152624 = r152619 * r152623;
        double r152625 = r152618 - r152624;
        return r152625;
}

double f(double x) {
        double r152626 = 1.0;
        double r152627 = x;
        double r152628 = 0.253;
        double r152629 = r152627 * r152628;
        double r152630 = 0.12;
        double r152631 = r152627 * r152630;
        double r152632 = r152627 * r152631;
        double r152633 = r152629 + r152632;
        double r152634 = r152626 - r152633;
        return r152634;
}

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. Final simplification0.1

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

Reproduce

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