Average Error: 0.1 → 0.1
Time: 2.8s
Precision: 64
\[1 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[\left(1 - 0.253 \cdot x\right) - \left(x \cdot 0.12\right) \cdot x\]
1 - x \cdot \left(0.253 + x \cdot 0.12\right)
\left(1 - 0.253 \cdot x\right) - \left(x \cdot 0.12\right) \cdot x
double f(double x) {
        double r101542 = 1.0;
        double r101543 = x;
        double r101544 = 0.253;
        double r101545 = 0.12;
        double r101546 = r101543 * r101545;
        double r101547 = r101544 + r101546;
        double r101548 = r101543 * r101547;
        double r101549 = r101542 - r101548;
        return r101549;
}

double f(double x) {
        double r101550 = 1.0;
        double r101551 = 0.253;
        double r101552 = x;
        double r101553 = r101551 * r101552;
        double r101554 = r101550 - r101553;
        double r101555 = 0.12;
        double r101556 = r101552 * r101555;
        double r101557 = r101556 * r101552;
        double r101558 = r101554 - r101557;
        return r101558;
}

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-rgt-in0.1

    \[\leadsto 1 - \color{blue}{\left(0.253 \cdot x + \left(x \cdot 0.12\right) \cdot x\right)}\]
  4. Applied associate--r+0.1

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

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

Reproduce

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