Average Error: 0.1 → 0.1
Time: 24.0s
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 r2912530 = 1.0;
        double r2912531 = x;
        double r2912532 = 0.253;
        double r2912533 = 0.12;
        double r2912534 = r2912531 * r2912533;
        double r2912535 = r2912532 + r2912534;
        double r2912536 = r2912531 * r2912535;
        double r2912537 = r2912530 - r2912536;
        return r2912537;
}

double f(double x) {
        double r2912538 = 1.0;
        double r2912539 = x;
        double r2912540 = 0.12;
        double r2912541 = 0.253;
        double r2912542 = fma(r2912540, r2912539, r2912541);
        double r2912543 = r2912539 * r2912542;
        double r2912544 = r2912538 - r2912543;
        return r2912544;
}

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