Average Error: 0.1 → 0.1
Time: 13.8s
Precision: 64
\[1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)\]
\[1 - x \cdot \frac{\mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right) \cdot \left(0.2530000000000000026645352591003756970167 - x \cdot 0.1199999999999999955591079014993738383055\right)}{0.2530000000000000026645352591003756970167 - x \cdot 0.1199999999999999955591079014993738383055}\]
1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)
1 - x \cdot \frac{\mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right) \cdot \left(0.2530000000000000026645352591003756970167 - x \cdot 0.1199999999999999955591079014993738383055\right)}{0.2530000000000000026645352591003756970167 - x \cdot 0.1199999999999999955591079014993738383055}
double f(double x) {
        double r64931 = 1.0;
        double r64932 = x;
        double r64933 = 0.253;
        double r64934 = 0.12;
        double r64935 = r64932 * r64934;
        double r64936 = r64933 + r64935;
        double r64937 = r64932 * r64936;
        double r64938 = r64931 - r64937;
        return r64938;
}

double f(double x) {
        double r64939 = 1.0;
        double r64940 = x;
        double r64941 = 0.12;
        double r64942 = 0.253;
        double r64943 = fma(r64941, r64940, r64942);
        double r64944 = r64940 * r64941;
        double r64945 = r64942 - r64944;
        double r64946 = r64943 * r64945;
        double r64947 = r64946 / r64945;
        double r64948 = r64940 * r64947;
        double r64949 = r64939 - r64948;
        return r64949;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.1

    \[1 - x \cdot \left(0.2530000000000000026645352591003756970167 + x \cdot 0.1199999999999999955591079014993738383055\right)\]
  2. Using strategy rm
  3. Applied flip-+0.1

    \[\leadsto 1 - x \cdot \color{blue}{\frac{0.2530000000000000026645352591003756970167 \cdot 0.2530000000000000026645352591003756970167 - \left(x \cdot 0.1199999999999999955591079014993738383055\right) \cdot \left(x \cdot 0.1199999999999999955591079014993738383055\right)}{0.2530000000000000026645352591003756970167 - x \cdot 0.1199999999999999955591079014993738383055}}\]
  4. Simplified0.1

    \[\leadsto 1 - x \cdot \frac{\color{blue}{\mathsf{fma}\left(0.1199999999999999955591079014993738383055, x, 0.2530000000000000026645352591003756970167\right) \cdot \left(0.2530000000000000026645352591003756970167 - x \cdot 0.1199999999999999955591079014993738383055\right)}}{0.2530000000000000026645352591003756970167 - x \cdot 0.1199999999999999955591079014993738383055}\]
  5. Final simplification0.1

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

Reproduce

herbie shell --seed 2019347 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, A"
  :precision binary64
  (- 1 (* x (+ 0.253 (* x 0.12)))))