Average Error: 0.1 → 0.1
Time: 15.7s
Precision: 64
\[1.0 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[1.0 - \left(0.253 \cdot x + \left(x \cdot 0.12\right) \cdot x\right)\]
1.0 - x \cdot \left(0.253 + x \cdot 0.12\right)
1.0 - \left(0.253 \cdot x + \left(x \cdot 0.12\right) \cdot x\right)
double f(double x) {
        double r4284799 = 1.0;
        double r4284800 = x;
        double r4284801 = 0.253;
        double r4284802 = 0.12;
        double r4284803 = r4284800 * r4284802;
        double r4284804 = r4284801 + r4284803;
        double r4284805 = r4284800 * r4284804;
        double r4284806 = r4284799 - r4284805;
        return r4284806;
}

double f(double x) {
        double r4284807 = 1.0;
        double r4284808 = 0.253;
        double r4284809 = x;
        double r4284810 = r4284808 * r4284809;
        double r4284811 = 0.12;
        double r4284812 = r4284809 * r4284811;
        double r4284813 = r4284812 * r4284809;
        double r4284814 = r4284810 + r4284813;
        double r4284815 = r4284807 - r4284814;
        return r4284815;
}

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.0 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
  2. Using strategy rm
  3. Applied distribute-lft-in0.1

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

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

Reproduce

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