Average Error: 0.1 → 0.1
Time: 16.6s
Precision: 64
\[1.0 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[1.0 - \left(0.253 \cdot x + \left(x \cdot x\right) \cdot 0.12\right)\]
1.0 - x \cdot \left(0.253 + x \cdot 0.12\right)
1.0 - \left(0.253 \cdot x + \left(x \cdot x\right) \cdot 0.12\right)
double f(double x) {
        double r3246973 = 1.0;
        double r3246974 = x;
        double r3246975 = 0.253;
        double r3246976 = 0.12;
        double r3246977 = r3246974 * r3246976;
        double r3246978 = r3246975 + r3246977;
        double r3246979 = r3246974 * r3246978;
        double r3246980 = r3246973 - r3246979;
        return r3246980;
}

double f(double x) {
        double r3246981 = 1.0;
        double r3246982 = 0.253;
        double r3246983 = x;
        double r3246984 = r3246982 * r3246983;
        double r3246985 = r3246983 * r3246983;
        double r3246986 = 0.12;
        double r3246987 = r3246985 * r3246986;
        double r3246988 = r3246984 + r3246987;
        double r3246989 = r3246981 - r3246988;
        return r3246989;
}

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. Using strategy rm
  5. Applied associate-*r*0.1

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

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

Reproduce

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