Average Error: 0.1 → 0.1
Time: 14.5s
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 r3280674 = 1.0;
        double r3280675 = x;
        double r3280676 = 0.253;
        double r3280677 = 0.12;
        double r3280678 = r3280675 * r3280677;
        double r3280679 = r3280676 + r3280678;
        double r3280680 = r3280675 * r3280679;
        double r3280681 = r3280674 - r3280680;
        return r3280681;
}

double f(double x) {
        double r3280682 = 1.0;
        double r3280683 = 0.12;
        double r3280684 = x;
        double r3280685 = 0.253;
        double r3280686 = fma(r3280683, r3280684, r3280685);
        double r3280687 = r3280686 * r3280684;
        double r3280688 = r3280682 - r3280687;
        return r3280688;
}

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