Average Error: 0.0 → 0.0
Time: 7.9s
Precision: 64
\[\frac{2.307529999999999859028321225196123123169 + x \cdot 0.2706100000000000171951342053944244980812}{1 + x \cdot \left(0.992290000000000005364597654988756403327 + x \cdot 0.04481000000000000260680366181986755691469\right)} - x\]
\[\frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(x, 0.04481000000000000260680366181986755691469, 0.992290000000000005364597654988756403327\right), x, 1\right)} \cdot \mathsf{fma}\left(x, 0.2706100000000000171951342053944244980812, 2.307529999999999859028321225196123123169\right) - x\]
\frac{2.307529999999999859028321225196123123169 + x \cdot 0.2706100000000000171951342053944244980812}{1 + x \cdot \left(0.992290000000000005364597654988756403327 + x \cdot 0.04481000000000000260680366181986755691469\right)} - x
\frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(x, 0.04481000000000000260680366181986755691469, 0.992290000000000005364597654988756403327\right), x, 1\right)} \cdot \mathsf{fma}\left(x, 0.2706100000000000171951342053944244980812, 2.307529999999999859028321225196123123169\right) - x
double f(double x) {
        double r3113440 = 2.30753;
        double r3113441 = x;
        double r3113442 = 0.27061;
        double r3113443 = r3113441 * r3113442;
        double r3113444 = r3113440 + r3113443;
        double r3113445 = 1.0;
        double r3113446 = 0.99229;
        double r3113447 = 0.04481;
        double r3113448 = r3113441 * r3113447;
        double r3113449 = r3113446 + r3113448;
        double r3113450 = r3113441 * r3113449;
        double r3113451 = r3113445 + r3113450;
        double r3113452 = r3113444 / r3113451;
        double r3113453 = r3113452 - r3113441;
        return r3113453;
}

double f(double x) {
        double r3113454 = 1.0;
        double r3113455 = x;
        double r3113456 = 0.04481;
        double r3113457 = 0.99229;
        double r3113458 = fma(r3113455, r3113456, r3113457);
        double r3113459 = 1.0;
        double r3113460 = fma(r3113458, r3113455, r3113459);
        double r3113461 = r3113454 / r3113460;
        double r3113462 = 0.27061;
        double r3113463 = 2.30753;
        double r3113464 = fma(r3113455, r3113462, r3113463);
        double r3113465 = r3113461 * r3113464;
        double r3113466 = r3113465 - r3113455;
        return r3113466;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[\frac{2.307529999999999859028321225196123123169 + x \cdot 0.2706100000000000171951342053944244980812}{1 + x \cdot \left(0.992290000000000005364597654988756403327 + x \cdot 0.04481000000000000260680366181986755691469\right)} - x\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, 0.2706100000000000171951342053944244980812, 2.307529999999999859028321225196123123169\right)}{\mathsf{fma}\left(\mathsf{fma}\left(x, 0.04481000000000000260680366181986755691469, 0.992290000000000005364597654988756403327\right), x, 1\right)} - x}\]
  3. Using strategy rm
  4. Applied div-inv0.0

    \[\leadsto \color{blue}{\mathsf{fma}\left(x, 0.2706100000000000171951342053944244980812, 2.307529999999999859028321225196123123169\right) \cdot \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(x, 0.04481000000000000260680366181986755691469, 0.992290000000000005364597654988756403327\right), x, 1\right)}} - x\]
  5. Final simplification0.0

    \[\leadsto \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(x, 0.04481000000000000260680366181986755691469, 0.992290000000000005364597654988756403327\right), x, 1\right)} \cdot \mathsf{fma}\left(x, 0.2706100000000000171951342053944244980812, 2.307529999999999859028321225196123123169\right) - x\]

Reproduce

herbie shell --seed 2019172 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, C"
  (- (/ (+ 2.30753 (* x 0.27061)) (+ 1.0 (* x (+ 0.99229 (* x 0.04481))))) x))