Average Error: 0.1 → 0.1
Time: 20.1s
Precision: 64
\[1 - x \cdot \left(0.253 + x \cdot 0.12\right)\]
\[1 - \left(\left(x \cdot 0.12\right) \cdot x + 0.253 \cdot x\right)\]
1 - x \cdot \left(0.253 + x \cdot 0.12\right)
1 - \left(\left(x \cdot 0.12\right) \cdot x + 0.253 \cdot x\right)
double f(double x) {
        double r42999 = 1.0;
        double r43000 = x;
        double r43001 = 0.253;
        double r43002 = 0.12;
        double r43003 = r43000 * r43002;
        double r43004 = r43001 + r43003;
        double r43005 = r43000 * r43004;
        double r43006 = r42999 - r43005;
        return r43006;
}

double f(double x) {
        double r43007 = 1.0;
        double r43008 = x;
        double r43009 = 0.12;
        double r43010 = r43008 * r43009;
        double r43011 = r43010 * r43008;
        double r43012 = 0.253;
        double r43013 = r43012 * r43008;
        double r43014 = r43011 + r43013;
        double r43015 = r43007 - r43014;
        return r43015;
}

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. Simplified0.1

    \[\leadsto \color{blue}{1 - x \cdot \left(x \cdot 0.12 + 0.253\right)}\]
  3. Using strategy rm
  4. Applied distribute-rgt-in0.1

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

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

Reproduce

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