Average Error: 0.1 → 0.1
Time: 15.3s
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 r2983036 = 1.0;
        double r2983037 = x;
        double r2983038 = 0.253;
        double r2983039 = 0.12;
        double r2983040 = r2983037 * r2983039;
        double r2983041 = r2983038 + r2983040;
        double r2983042 = r2983037 * r2983041;
        double r2983043 = r2983036 - r2983042;
        return r2983043;
}

double f(double x) {
        double r2983044 = 1.0;
        double r2983045 = 0.12;
        double r2983046 = x;
        double r2983047 = 0.253;
        double r2983048 = fma(r2983045, r2983046, r2983047);
        double r2983049 = r2983048 * r2983046;
        double r2983050 = r2983044 - r2983049;
        return r2983050;
}

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