Average Error: 0.1 → 0.1
Time: 13.7s
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 r82741 = 1.0;
        double r82742 = x;
        double r82743 = 0.253;
        double r82744 = 0.12;
        double r82745 = r82742 * r82744;
        double r82746 = r82743 + r82745;
        double r82747 = r82742 * r82746;
        double r82748 = r82741 - r82747;
        return r82748;
}

double f(double x) {
        double r82749 = 1.0;
        double r82750 = 0.12;
        double r82751 = x;
        double r82752 = 0.253;
        double r82753 = fma(r82750, r82751, r82752);
        double r82754 = r82753 * r82751;
        double r82755 = r82749 - r82754;
        return r82755;
}

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