Average Error: 0.1 → 0.2
Time: 18.4s
Precision: 64
\[1.0 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[\left(1.0 - \left(x \cdot x\right) \cdot 0.12\right) - 0.253 \cdot x\]
1.0 - x \cdot \left(0.253 + x \cdot 0.12\right)
\left(1.0 - \left(x \cdot x\right) \cdot 0.12\right) - 0.253 \cdot x
double f(double x) {
        double r5214355 = 1.0;
        double r5214356 = x;
        double r5214357 = 0.253;
        double r5214358 = 0.12;
        double r5214359 = r5214356 * r5214358;
        double r5214360 = r5214357 + r5214359;
        double r5214361 = r5214356 * r5214360;
        double r5214362 = r5214355 - r5214361;
        return r5214362;
}

double f(double x) {
        double r5214363 = 1.0;
        double r5214364 = x;
        double r5214365 = r5214364 * r5214364;
        double r5214366 = 0.12;
        double r5214367 = r5214365 * r5214366;
        double r5214368 = r5214363 - r5214367;
        double r5214369 = 0.253;
        double r5214370 = r5214369 * r5214364;
        double r5214371 = r5214368 - r5214370;
        return r5214371;
}

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 +-commutative0.1

    \[\leadsto 1.0 - x \cdot \color{blue}{\left(x \cdot 0.12 + 0.253\right)}\]
  4. Applied distribute-rgt-in0.1

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

    \[\leadsto \color{blue}{\left(1.0 - \left(x \cdot 0.12\right) \cdot x\right) - 0.253 \cdot x}\]
  6. Using strategy rm
  7. Applied *-commutative0.1

    \[\leadsto \left(1.0 - \color{blue}{\left(0.12 \cdot x\right)} \cdot x\right) - 0.253 \cdot x\]
  8. Applied associate-*l*0.2

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

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

Reproduce

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