Average Error: 0.1 → 0.1
Time: 9.1s
Precision: 64
\[1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)\]
\[1 - \mathsf{fma}\left(0.1199999999999999955591079014993738383055, x \cdot x, 0.2530000000000000026645352591003756970167 \cdot x\right)\]
1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)
1 - \mathsf{fma}\left(0.1199999999999999955591079014993738383055, x \cdot x, 0.2530000000000000026645352591003756970167 \cdot x\right)
double f(double x) {
        double r44757 = 1.0;
        double r44758 = x;
        double r44759 = 0.253;
        double r44760 = 0.12;
        double r44761 = r44758 * r44760;
        double r44762 = r44759 + r44761;
        double r44763 = r44758 * r44762;
        double r44764 = r44757 - r44763;
        return r44764;
}

double f(double x) {
        double r44765 = 1.0;
        double r44766 = 0.12;
        double r44767 = x;
        double r44768 = r44767 * r44767;
        double r44769 = 0.253;
        double r44770 = r44769 * r44767;
        double r44771 = fma(r44766, r44768, r44770);
        double r44772 = r44765 - r44771;
        return r44772;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.1

    \[1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)\]
  2. Taylor expanded around 0 0.2

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

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

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

Reproduce

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