Average Error: 0.1 → 0.1
Time: 23.3s
Precision: 64
\[1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)\]
\[1 - x \cdot \mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right)\]
1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)
1 - x \cdot \mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right)
double f(double x) {
        double r3070763 = 1.0;
        double r3070764 = x;
        double r3070765 = 0.253;
        double r3070766 = 0.12;
        double r3070767 = r3070764 * r3070766;
        double r3070768 = r3070765 + r3070767;
        double r3070769 = r3070764 * r3070768;
        double r3070770 = r3070763 - r3070769;
        return r3070770;
}

double f(double x) {
        double r3070771 = 1.0;
        double r3070772 = x;
        double r3070773 = 0.12;
        double r3070774 = 0.253;
        double r3070775 = fma(r3070773, r3070772, r3070774);
        double r3070776 = r3070772 * r3070775;
        double r3070777 = r3070771 - r3070776;
        return r3070777;
}

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. Final simplification0.1

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

Reproduce

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