Average Error: 0.1 → 0.1
Time: 19.0s
Precision: 64
\[1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)\]
\[\mathsf{fma}\left(-x, \mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right), 1\right)\]
1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)
\mathsf{fma}\left(-x, \mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right), 1\right)
double f(double x) {
        double r63138 = 1.0;
        double r63139 = x;
        double r63140 = 0.253;
        double r63141 = 0.12;
        double r63142 = r63139 * r63141;
        double r63143 = r63140 + r63142;
        double r63144 = r63139 * r63143;
        double r63145 = r63138 - r63144;
        return r63145;
}

double f(double x) {
        double r63146 = x;
        double r63147 = -r63146;
        double r63148 = 0.12;
        double r63149 = 0.253;
        double r63150 = fma(r63148, r63146, r63149);
        double r63151 = 1.0;
        double r63152 = fma(r63147, r63150, r63151);
        return r63152;
}

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. Taylor expanded around 0 0.1

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

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

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

Reproduce

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