Average Error: 0.0 → 0.1
Time: 9.2s
Precision: 64
\[\frac{2.307529999999999859028321225196123123169 + x \cdot 0.2706100000000000171951342053944244980812}{1 + x \cdot \left(0.992290000000000005364597654988756403327 + x \cdot 0.04481000000000000260680366181986755691469\right)} - x\]
\[\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\mathsf{fma}\left(x, 0.2706100000000000171951342053944244980812, 2.307529999999999859028321225196123123169\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), 1\right)}\right)\right) - x\]
\frac{2.307529999999999859028321225196123123169 + x \cdot 0.2706100000000000171951342053944244980812}{1 + x \cdot \left(0.992290000000000005364597654988756403327 + x \cdot 0.04481000000000000260680366181986755691469\right)} - x
\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\mathsf{fma}\left(x, 0.2706100000000000171951342053944244980812, 2.307529999999999859028321225196123123169\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), 1\right)}\right)\right) - x
double f(double x) {
        double r52075 = 2.30753;
        double r52076 = x;
        double r52077 = 0.27061;
        double r52078 = r52076 * r52077;
        double r52079 = r52075 + r52078;
        double r52080 = 1.0;
        double r52081 = 0.99229;
        double r52082 = 0.04481;
        double r52083 = r52076 * r52082;
        double r52084 = r52081 + r52083;
        double r52085 = r52076 * r52084;
        double r52086 = r52080 + r52085;
        double r52087 = r52079 / r52086;
        double r52088 = r52087 - r52076;
        return r52088;
}

double f(double x) {
        double r52089 = x;
        double r52090 = 0.27061;
        double r52091 = 2.30753;
        double r52092 = fma(r52089, r52090, r52091);
        double r52093 = 0.04481;
        double r52094 = 0.99229;
        double r52095 = fma(r52093, r52089, r52094);
        double r52096 = 1.0;
        double r52097 = fma(r52089, r52095, r52096);
        double r52098 = r52092 / r52097;
        double r52099 = log1p(r52098);
        double r52100 = expm1(r52099);
        double r52101 = r52100 - r52089;
        return r52101;
}

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(x, \mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), 1\right)} - x}\]
  3. Using strategy rm
  4. Applied expm1-log1p-u0.1

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

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

Reproduce

herbie shell --seed 2019208 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, C"
  :precision binary64
  (- (/ (+ 2.30753 (* x 0.27061000000000002)) (+ 1 (* x (+ 0.992290000000000005 (* x 0.044810000000000003))))) x))