Average Error: 0.1 → 0.1
Time: 16.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 r3664929 = 1.0;
        double r3664930 = x;
        double r3664931 = 0.253;
        double r3664932 = 0.12;
        double r3664933 = r3664930 * r3664932;
        double r3664934 = r3664931 + r3664933;
        double r3664935 = r3664930 * r3664934;
        double r3664936 = r3664929 - r3664935;
        return r3664936;
}

double f(double x) {
        double r3664937 = 1.0;
        double r3664938 = 0.253;
        double r3664939 = x;
        double r3664940 = r3664938 * r3664939;
        double r3664941 = 0.12;
        double r3664942 = r3664939 * r3664941;
        double r3664943 = r3664942 * r3664939;
        double r3664944 = r3664940 + r3664943;
        double r3664945 = r3664937 - r3664944;
        return r3664945;
}

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