Average Error: 0.1 → 0.2
Time: 1.8s
Precision: 64
\[1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)\]
\[\left(-0.1199999999999999955591079014993738383055 \cdot {x}^{2}\right) + \mathsf{fma}\left(0.2530000000000000026645352591003756970167, -x, 1\right)\]
1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)
\left(-0.1199999999999999955591079014993738383055 \cdot {x}^{2}\right) + \mathsf{fma}\left(0.2530000000000000026645352591003756970167, -x, 1\right)
double f(double x) {
        double r58443 = 1.0;
        double r58444 = x;
        double r58445 = 0.253;
        double r58446 = 0.12;
        double r58447 = r58444 * r58446;
        double r58448 = r58445 + r58447;
        double r58449 = r58444 * r58448;
        double r58450 = r58443 - r58449;
        return r58450;
}

double f(double x) {
        double r58451 = 0.12;
        double r58452 = x;
        double r58453 = 2.0;
        double r58454 = pow(r58452, r58453);
        double r58455 = r58451 * r58454;
        double r58456 = -r58455;
        double r58457 = 0.253;
        double r58458 = -r58452;
        double r58459 = 1.0;
        double r58460 = fma(r58457, r58458, r58459);
        double r58461 = r58456 + r58460;
        return r58461;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.1

    \[1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)\]
  2. Simplified0.1

    \[\leadsto \color{blue}{\mathsf{fma}\left(-x, \mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right), 1\right)}\]
  3. Using strategy rm
  4. Applied fma-udef0.1

    \[\leadsto \color{blue}{\left(-x\right) \cdot \mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right) + 1}\]
  5. Using strategy rm
  6. Applied fma-udef0.1

    \[\leadsto \left(-x\right) \cdot \color{blue}{\left(0.1199999999999999955591079014993738383055 \cdot x + 0.2530000000000000026645352591003756970167\right)} + 1\]
  7. Applied distribute-lft-in0.1

    \[\leadsto \color{blue}{\left(\left(-x\right) \cdot \left(0.1199999999999999955591079014993738383055 \cdot x\right) + \left(-x\right) \cdot 0.2530000000000000026645352591003756970167\right)} + 1\]
  8. Applied associate-+l+0.1

    \[\leadsto \color{blue}{\left(-x\right) \cdot \left(0.1199999999999999955591079014993738383055 \cdot x\right) + \left(\left(-x\right) \cdot 0.2530000000000000026645352591003756970167 + 1\right)}\]
  9. Simplified0.1

    \[\leadsto \left(-x\right) \cdot \left(0.1199999999999999955591079014993738383055 \cdot x\right) + \color{blue}{\mathsf{fma}\left(0.2530000000000000026645352591003756970167, -x, 1\right)}\]
  10. Using strategy rm
  11. Applied distribute-lft-neg-out0.1

    \[\leadsto \color{blue}{\left(-x \cdot \left(0.1199999999999999955591079014993738383055 \cdot x\right)\right)} + \mathsf{fma}\left(0.2530000000000000026645352591003756970167, -x, 1\right)\]
  12. Simplified0.2

    \[\leadsto \left(-\color{blue}{0.1199999999999999955591079014993738383055 \cdot {x}^{2}}\right) + \mathsf{fma}\left(0.2530000000000000026645352591003756970167, -x, 1\right)\]
  13. Final simplification0.2

    \[\leadsto \left(-0.1199999999999999955591079014993738383055 \cdot {x}^{2}\right) + \mathsf{fma}\left(0.2530000000000000026645352591003756970167, -x, 1\right)\]

Reproduce

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