Average Error: 0.1 → 0.1
Time: 2.7s
Precision: 64
\[1 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[1 - \left(x \cdot 0.253 + x \cdot \left(x \cdot 0.12\right)\right)\]
1 - x \cdot \left(0.253 + x \cdot 0.12\right)
1 - \left(x \cdot 0.253 + x \cdot \left(x \cdot 0.12\right)\right)
double f(double x) {
        double r64867 = 1.0;
        double r64868 = x;
        double r64869 = 0.253;
        double r64870 = 0.12;
        double r64871 = r64868 * r64870;
        double r64872 = r64869 + r64871;
        double r64873 = r64868 * r64872;
        double r64874 = r64867 - r64873;
        return r64874;
}

double f(double x) {
        double r64875 = 1.0;
        double r64876 = x;
        double r64877 = 0.253;
        double r64878 = r64876 * r64877;
        double r64879 = 0.12;
        double r64880 = r64876 * r64879;
        double r64881 = r64876 * r64880;
        double r64882 = r64878 + r64881;
        double r64883 = r64875 - r64882;
        return r64883;
}

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. Final simplification0.1

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

Reproduce

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