Average Error: 0.1 → 0.1
Time: 23.1s
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 r3478448 = 1.0;
        double r3478449 = x;
        double r3478450 = 0.253;
        double r3478451 = 0.12;
        double r3478452 = r3478449 * r3478451;
        double r3478453 = r3478450 + r3478452;
        double r3478454 = r3478449 * r3478453;
        double r3478455 = r3478448 - r3478454;
        return r3478455;
}

double f(double x) {
        double r3478456 = 1.0;
        double r3478457 = x;
        double r3478458 = 0.12;
        double r3478459 = 0.253;
        double r3478460 = fma(r3478458, r3478457, r3478459);
        double r3478461 = r3478457 * r3478460;
        double r3478462 = r3478456 - r3478461;
        return r3478462;
}

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