Average Error: 0.1 → 0.1
Time: 16.4s
Precision: 64
\[1.0 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[1.0 - \left(x \cdot 0.253 + x \cdot \left(0.12 \cdot x\right)\right)\]
1.0 - x \cdot \left(0.253 + x \cdot 0.12\right)
1.0 - \left(x \cdot 0.253 + x \cdot \left(0.12 \cdot x\right)\right)
double f(double x) {
        double r5047063 = 1.0;
        double r5047064 = x;
        double r5047065 = 0.253;
        double r5047066 = 0.12;
        double r5047067 = r5047064 * r5047066;
        double r5047068 = r5047065 + r5047067;
        double r5047069 = r5047064 * r5047068;
        double r5047070 = r5047063 - r5047069;
        return r5047070;
}

double f(double x) {
        double r5047071 = 1.0;
        double r5047072 = x;
        double r5047073 = 0.253;
        double r5047074 = r5047072 * r5047073;
        double r5047075 = 0.12;
        double r5047076 = r5047075 * r5047072;
        double r5047077 = r5047072 * r5047076;
        double r5047078 = r5047074 + r5047077;
        double r5047079 = r5047071 - r5047078;
        return r5047079;
}

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.0 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
  2. Using strategy rm
  3. Applied distribute-rgt-in0.1

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

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

Reproduce

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