Average Error: 0.1 → 0.1
Time: 2.1s
Precision: 64
\[1 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[1 - 1 \cdot \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 - 1 \cdot \left(x \cdot 0.253 + x \cdot \left(x \cdot 0.12\right)\right)
double f(double x) {
        double r64874 = 1.0;
        double r64875 = x;
        double r64876 = 0.253;
        double r64877 = 0.12;
        double r64878 = r64875 * r64877;
        double r64879 = r64876 + r64878;
        double r64880 = r64875 * r64879;
        double r64881 = r64874 - r64880;
        return r64881;
}

double f(double x) {
        double r64882 = 1.0;
        double r64883 = 1.0;
        double r64884 = x;
        double r64885 = 0.253;
        double r64886 = r64884 * r64885;
        double r64887 = 0.12;
        double r64888 = r64884 * r64887;
        double r64889 = r64884 * r64888;
        double r64890 = r64886 + r64889;
        double r64891 = r64883 * r64890;
        double r64892 = r64882 - r64891;
        return r64892;
}

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. Using strategy rm
  5. Applied *-un-lft-identity0.1

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

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

Reproduce

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