Average Error: 0.1 → 0.1
Time: 43.5s
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 r3732192 = 1.0;
        double r3732193 = x;
        double r3732194 = 0.253;
        double r3732195 = 0.12;
        double r3732196 = r3732193 * r3732195;
        double r3732197 = r3732194 + r3732196;
        double r3732198 = r3732193 * r3732197;
        double r3732199 = r3732192 - r3732198;
        return r3732199;
}

double f(double x) {
        double r3732200 = 1.0;
        double r3732201 = x;
        double r3732202 = 0.12;
        double r3732203 = 0.253;
        double r3732204 = fma(r3732202, r3732201, r3732203);
        double r3732205 = r3732201 * r3732204;
        double r3732206 = r3732200 - r3732205;
        return r3732206;
}

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