Average Error: 0.1 → 0.1
Time: 16.4s
Precision: 64
\[1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)\]
\[1 - \mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right) \cdot x\]
1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)
1 - \mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right) \cdot x
double f(double x) {
        double r4713410 = 1.0;
        double r4713411 = x;
        double r4713412 = 0.253;
        double r4713413 = 0.12;
        double r4713414 = r4713411 * r4713413;
        double r4713415 = r4713412 + r4713414;
        double r4713416 = r4713411 * r4713415;
        double r4713417 = r4713410 - r4713416;
        return r4713417;
}

double f(double x) {
        double r4713418 = 1.0;
        double r4713419 = 0.12;
        double r4713420 = x;
        double r4713421 = 0.253;
        double r4713422 = fma(r4713419, r4713420, r4713421);
        double r4713423 = r4713422 * r4713420;
        double r4713424 = r4713418 - r4713423;
        return r4713424;
}

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

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

Reproduce

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