Average Error: 0.1 → 0.2
Time: 16.8s
Precision: 64
\[1.0 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[\left(1.0 - x \cdot 0.253\right) - \left(x \cdot x\right) \cdot 0.12\]
1.0 - x \cdot \left(0.253 + x \cdot 0.12\right)
\left(1.0 - x \cdot 0.253\right) - \left(x \cdot x\right) \cdot 0.12
double f(double x) {
        double r2783550 = 1.0;
        double r2783551 = x;
        double r2783552 = 0.253;
        double r2783553 = 0.12;
        double r2783554 = r2783551 * r2783553;
        double r2783555 = r2783552 + r2783554;
        double r2783556 = r2783551 * r2783555;
        double r2783557 = r2783550 - r2783556;
        return r2783557;
}

double f(double x) {
        double r2783558 = 1.0;
        double r2783559 = x;
        double r2783560 = 0.253;
        double r2783561 = r2783559 * r2783560;
        double r2783562 = r2783558 - r2783561;
        double r2783563 = r2783559 * r2783559;
        double r2783564 = 0.12;
        double r2783565 = r2783563 * r2783564;
        double r2783566 = r2783562 - r2783565;
        return r2783566;
}

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

    \[\leadsto 1.0 - \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 - 0.253 \cdot x\right) - \left(x \cdot 0.12\right) \cdot x}\]
  5. Using strategy rm
  6. Applied add-sqr-sqrt0.2

    \[\leadsto \left(1.0 - 0.253 \cdot x\right) - \color{blue}{\sqrt{\left(x \cdot 0.12\right) \cdot x} \cdot \sqrt{\left(x \cdot 0.12\right) \cdot x}}\]
  7. Taylor expanded around 0 0.2

    \[\leadsto \left(1.0 - 0.253 \cdot x\right) - \color{blue}{{x}^{2} \cdot {\left(\sqrt{0.12}\right)}^{2}}\]
  8. Simplified0.2

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

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

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)))))