Average Error: 0.1 → 0.1
Time: 15.9s
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 r4579276 = 1.0;
        double r4579277 = x;
        double r4579278 = 0.253;
        double r4579279 = 0.12;
        double r4579280 = r4579277 * r4579279;
        double r4579281 = r4579278 + r4579280;
        double r4579282 = r4579277 * r4579281;
        double r4579283 = r4579276 - r4579282;
        return r4579283;
}

double f(double x) {
        double r4579284 = 1.0;
        double r4579285 = 0.253;
        double r4579286 = x;
        double r4579287 = r4579285 * r4579286;
        double r4579288 = 0.12;
        double r4579289 = r4579286 * r4579288;
        double r4579290 = r4579289 * r4579286;
        double r4579291 = r4579287 + r4579290;
        double r4579292 = r4579284 - r4579291;
        return r4579292;
}

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