Average Error: 0.1 → 0.1
Time: 19.3s
Precision: 64
\[1.0 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[1.0 - \mathsf{fma}\left(0.12, x, 0.253\right) \cdot x\]
1.0 - x \cdot \left(0.253 + x \cdot 0.12\right)
1.0 - \mathsf{fma}\left(0.12, x, 0.253\right) \cdot x
double f(double x) {
        double r2298533 = 1.0;
        double r2298534 = x;
        double r2298535 = 0.253;
        double r2298536 = 0.12;
        double r2298537 = r2298534 * r2298536;
        double r2298538 = r2298535 + r2298537;
        double r2298539 = r2298534 * r2298538;
        double r2298540 = r2298533 - r2298539;
        return r2298540;
}

double f(double x) {
        double r2298541 = 1.0;
        double r2298542 = 0.12;
        double r2298543 = x;
        double r2298544 = 0.253;
        double r2298545 = fma(r2298542, r2298543, r2298544);
        double r2298546 = r2298545 * r2298543;
        double r2298547 = r2298541 - r2298546;
        return r2298547;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.1

    \[1.0 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
  2. Simplified0.1

    \[\leadsto \color{blue}{1.0 - \mathsf{fma}\left(0.12, x, 0.253\right) \cdot x}\]
  3. Final simplification0.1

    \[\leadsto 1.0 - \mathsf{fma}\left(0.12, x, 0.253\right) \cdot x\]

Reproduce

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