Average Error: 0.1 → 0.2
Time: 2.2s
Precision: 64
\[1 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[1 - \left(0.12 \cdot {x}^{2} + 0.253 \cdot x\right)\]
1 - x \cdot \left(0.253 + x \cdot 0.12\right)
1 - \left(0.12 \cdot {x}^{2} + 0.253 \cdot x\right)
double f(double x) {
        double r65472 = 1.0;
        double r65473 = x;
        double r65474 = 0.253;
        double r65475 = 0.12;
        double r65476 = r65473 * r65475;
        double r65477 = r65474 + r65476;
        double r65478 = r65473 * r65477;
        double r65479 = r65472 - r65478;
        return r65479;
}

double f(double x) {
        double r65480 = 1.0;
        double r65481 = 0.12;
        double r65482 = x;
        double r65483 = 2.0;
        double r65484 = pow(r65482, r65483);
        double r65485 = r65481 * r65484;
        double r65486 = 0.253;
        double r65487 = r65486 * r65482;
        double r65488 = r65485 + r65487;
        double r65489 = r65480 - r65488;
        return r65489;
}

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. Taylor expanded around 0 0.2

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

    \[\leadsto 1 - \left(0.12 \cdot {x}^{2} + 0.253 \cdot x\right)\]

Reproduce

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