Average Error: 0.1 → 0.1
Time: 25.9s
Precision: 64
\[1 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[1 - \left(0.253 \cdot x + \left(x \cdot 0.12\right) \cdot x\right)\]
1 - x \cdot \left(0.253 + x \cdot 0.12\right)
1 - \left(0.253 \cdot x + \left(x \cdot 0.12\right) \cdot x\right)
double f(double x) {
        double r79952 = 1.0;
        double r79953 = x;
        double r79954 = 0.253;
        double r79955 = 0.12;
        double r79956 = r79953 * r79955;
        double r79957 = r79954 + r79956;
        double r79958 = r79953 * r79957;
        double r79959 = r79952 - r79958;
        return r79959;
}

double f(double x) {
        double r79960 = 1.0;
        double r79961 = 0.253;
        double r79962 = x;
        double r79963 = r79961 * r79962;
        double r79964 = 0.12;
        double r79965 = r79962 * r79964;
        double r79966 = r79965 * r79962;
        double r79967 = r79963 + r79966;
        double r79968 = r79960 - r79967;
        return r79968;
}

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-rgt-in0.1

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

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

Reproduce

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