Average Error: 0.1 → 0.1
Time: 18.9s
Precision: 64
\[1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)\]
\[1 - \mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right) \cdot x\]
1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)
1 - \mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right) \cdot x
double f(double x) {
        double r72634 = 1.0;
        double r72635 = x;
        double r72636 = 0.253;
        double r72637 = 0.12;
        double r72638 = r72635 * r72637;
        double r72639 = r72636 + r72638;
        double r72640 = r72635 * r72639;
        double r72641 = r72634 - r72640;
        return r72641;
}

double f(double x) {
        double r72642 = 1.0;
        double r72643 = 0.12;
        double r72644 = x;
        double r72645 = 0.253;
        double r72646 = fma(r72643, r72644, r72645);
        double r72647 = r72646 * r72644;
        double r72648 = r72642 - r72647;
        return r72648;
}

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}{1 - \mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right) \cdot x}\]
  3. Final simplification0.1

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

Reproduce

herbie shell --seed 2019323 +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)))))