Average Error: 0.0 → 0.0
Time: 2.5s
Precision: 64
\[x - \frac{2.307529999999999859028321225196123123169 + x \cdot 0.2706100000000000171951342053944244980812}{1 + \left(0.992290000000000005364597654988756403327 + x \cdot 0.04481000000000000260680366181986755691469\right) \cdot x}\]
\[\mathsf{fma}\left(-\mathsf{fma}\left(0.2706100000000000171951342053944244980812, x, 2.307529999999999859028321225196123123169\right), \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), 1\right)}\right)\right), x\right)\]
x - \frac{2.307529999999999859028321225196123123169 + x \cdot 0.2706100000000000171951342053944244980812}{1 + \left(0.992290000000000005364597654988756403327 + x \cdot 0.04481000000000000260680366181986755691469\right) \cdot x}
\mathsf{fma}\left(-\mathsf{fma}\left(0.2706100000000000171951342053944244980812, x, 2.307529999999999859028321225196123123169\right), \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), 1\right)}\right)\right), x\right)
double f(double x) {
        double r123964 = x;
        double r123965 = 2.30753;
        double r123966 = 0.27061;
        double r123967 = r123964 * r123966;
        double r123968 = r123965 + r123967;
        double r123969 = 1.0;
        double r123970 = 0.99229;
        double r123971 = 0.04481;
        double r123972 = r123964 * r123971;
        double r123973 = r123970 + r123972;
        double r123974 = r123973 * r123964;
        double r123975 = r123969 + r123974;
        double r123976 = r123968 / r123975;
        double r123977 = r123964 - r123976;
        return r123977;
}

double f(double x) {
        double r123978 = 0.27061;
        double r123979 = x;
        double r123980 = 2.30753;
        double r123981 = fma(r123978, r123979, r123980);
        double r123982 = -r123981;
        double r123983 = 1.0;
        double r123984 = 0.04481;
        double r123985 = 0.99229;
        double r123986 = fma(r123984, r123979, r123985);
        double r123987 = 1.0;
        double r123988 = fma(r123979, r123986, r123987);
        double r123989 = r123983 / r123988;
        double r123990 = log1p(r123989);
        double r123991 = expm1(r123990);
        double r123992 = fma(r123982, r123991, r123979);
        return r123992;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.0

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

    \[\leadsto \color{blue}{\frac{-\mathsf{fma}\left(0.2706100000000000171951342053944244980812, x, 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 div-inv0.0

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(-\mathsf{fma}\left(0.2706100000000000171951342053944244980812, x, 2.307529999999999859028321225196123123169\right), \frac{1}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), 1\right)}, x\right)}\]
  6. Using strategy rm
  7. Applied expm1-log1p-u0.0

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

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

Reproduce

herbie shell --seed 2019352 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, D"
  :precision binary64
  (- x (/ (+ 2.30753 (* x 0.27061)) (+ 1 (* (+ 0.99229 (* x 0.04481)) x)))))