Average Error: 0.1 → 0.1
Time: 19.2s
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 r2991731 = 1.0;
        double r2991732 = x;
        double r2991733 = 0.253;
        double r2991734 = 0.12;
        double r2991735 = r2991732 * r2991734;
        double r2991736 = r2991733 + r2991735;
        double r2991737 = r2991732 * r2991736;
        double r2991738 = r2991731 - r2991737;
        return r2991738;
}

double f(double x) {
        double r2991739 = 1.0;
        double r2991740 = 0.12;
        double r2991741 = x;
        double r2991742 = 0.253;
        double r2991743 = fma(r2991740, r2991741, r2991742);
        double r2991744 = r2991743 * r2991741;
        double r2991745 = r2991739 - r2991744;
        return r2991745;
}

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 - x \cdot \mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right)}\]
  3. Using strategy rm
  4. Applied *-commutative0.1

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

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

Reproduce

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