Average Error: 0.1 → 0.1
Time: 3.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 r371 = 1.0;
        double r372 = x;
        double r373 = 0.253;
        double r374 = 0.12;
        double r375 = r372 * r374;
        double r376 = r373 + r375;
        double r377 = r372 * r376;
        double r378 = r371 - r377;
        return r378;
}

double f(double x) {
        double r379 = 1.0;
        double r380 = 0.253;
        double r381 = x;
        double r382 = r380 * r381;
        double r383 = r379 - r382;
        double r384 = 0.12;
        double r385 = r381 * r384;
        double r386 = r385 * r381;
        double r387 = r383 - r386;
        return r387;
}

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