Average Error: 0.1 → 0.1
Time: 18.7s
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 r84807 = 1.0;
        double r84808 = x;
        double r84809 = 0.253;
        double r84810 = 0.12;
        double r84811 = r84808 * r84810;
        double r84812 = r84809 + r84811;
        double r84813 = r84808 * r84812;
        double r84814 = r84807 - r84813;
        return r84814;
}

double f(double x) {
        double r84815 = x;
        double r84816 = -r84815;
        double r84817 = 0.12;
        double r84818 = 0.253;
        double r84819 = fma(r84817, r84815, r84818);
        double r84820 = 1.0;
        double r84821 = fma(r84816, r84819, r84820);
        return r84821;
}

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