Average Error: 0.1 → 0.1
Time: 3.7s
Precision: 64
\[1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)\]
\[1 - x \cdot \mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right)\]
1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)
1 - x \cdot \mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right)
double f(double x) {
        double r103370 = 1.0;
        double r103371 = x;
        double r103372 = 0.253;
        double r103373 = 0.12;
        double r103374 = r103371 * r103373;
        double r103375 = r103372 + r103374;
        double r103376 = r103371 * r103375;
        double r103377 = r103370 - r103376;
        return r103377;
}

double f(double x) {
        double r103378 = 1.0;
        double r103379 = x;
        double r103380 = 0.12;
        double r103381 = 0.253;
        double r103382 = fma(r103380, r103379, r103381);
        double r103383 = r103379 * r103382;
        double r103384 = r103378 - r103383;
        return r103384;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.1

    \[1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)\]
  2. Taylor expanded around 0 0.1

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

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

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

Reproduce

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