Average Error: 0.1 → 0.1
Time: 10.7s
Precision: 64
\[1 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[1 - \left(0.253 \cdot x + x \cdot \left(x \cdot 0.12\right)\right)\]
1 - x \cdot \left(0.253 + x \cdot 0.12\right)
1 - \left(0.253 \cdot x + x \cdot \left(x \cdot 0.12\right)\right)
double f(double x) {
        double r58550 = 1.0;
        double r58551 = x;
        double r58552 = 0.253;
        double r58553 = 0.12;
        double r58554 = r58551 * r58553;
        double r58555 = r58552 + r58554;
        double r58556 = r58551 * r58555;
        double r58557 = r58550 - r58556;
        return r58557;
}

double f(double x) {
        double r58558 = 1.0;
        double r58559 = 0.253;
        double r58560 = x;
        double r58561 = r58559 * r58560;
        double r58562 = 0.12;
        double r58563 = r58560 * r58562;
        double r58564 = r58560 * r58563;
        double r58565 = r58561 + r58564;
        double r58566 = r58558 - r58565;
        return r58566;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[1 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
  2. Using strategy rm
  3. Applied distribute-lft-in0.1

    \[\leadsto 1 - \color{blue}{\left(x \cdot 0.253 + x \cdot \left(x \cdot 0.12\right)\right)}\]
  4. Simplified0.1

    \[\leadsto 1 - \left(\color{blue}{0.253 \cdot x} + x \cdot \left(x \cdot 0.12\right)\right)\]
  5. Final simplification0.1

    \[\leadsto 1 - \left(0.253 \cdot x + x \cdot \left(x \cdot 0.12\right)\right)\]

Reproduce

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