Average Error: 0.1 → 0.1
Time: 16.8s
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 r2879896 = 1.0;
        double r2879897 = x;
        double r2879898 = 0.253;
        double r2879899 = 0.12;
        double r2879900 = r2879897 * r2879899;
        double r2879901 = r2879898 + r2879900;
        double r2879902 = r2879897 * r2879901;
        double r2879903 = r2879896 - r2879902;
        return r2879903;
}

double f(double x) {
        double r2879904 = 1.0;
        double r2879905 = 0.12;
        double r2879906 = x;
        double r2879907 = 0.253;
        double r2879908 = fma(r2879905, r2879906, r2879907);
        double r2879909 = r2879908 * r2879906;
        double r2879910 = r2879904 - r2879909;
        return r2879910;
}

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 2019174 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, A"
  (- 1.0 (* x (+ 0.253 (* x 0.12)))))