Average Error: 0.0 → 0.0
Time: 16.1s
Precision: 64
\[x - \frac{2.30753 + x \cdot 0.27061000000000002}{1 + \left(0.992290000000000005 + x \cdot 0.044810000000000003\right) \cdot x}\]
\[x - \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\mathsf{fma}\left(x, 0.27061000000000002, 2.30753\right)}{\mathsf{fma}\left(\mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), x, 1\right)}\right)\right)\]
x - \frac{2.30753 + x \cdot 0.27061000000000002}{1 + \left(0.992290000000000005 + x \cdot 0.044810000000000003\right) \cdot x}
x - \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\mathsf{fma}\left(x, 0.27061000000000002, 2.30753\right)}{\mathsf{fma}\left(\mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), x, 1\right)}\right)\right)
double f(double x) {
        double r106831 = x;
        double r106832 = 2.30753;
        double r106833 = 0.27061;
        double r106834 = r106831 * r106833;
        double r106835 = r106832 + r106834;
        double r106836 = 1.0;
        double r106837 = 0.99229;
        double r106838 = 0.04481;
        double r106839 = r106831 * r106838;
        double r106840 = r106837 + r106839;
        double r106841 = r106840 * r106831;
        double r106842 = r106836 + r106841;
        double r106843 = r106835 / r106842;
        double r106844 = r106831 - r106843;
        return r106844;
}

double f(double x) {
        double r106845 = x;
        double r106846 = 0.27061;
        double r106847 = 2.30753;
        double r106848 = fma(r106845, r106846, r106847);
        double r106849 = 0.04481;
        double r106850 = 0.99229;
        double r106851 = fma(r106849, r106845, r106850);
        double r106852 = 1.0;
        double r106853 = fma(r106851, r106845, r106852);
        double r106854 = r106848 / r106853;
        double r106855 = log1p(r106854);
        double r106856 = expm1(r106855);
        double r106857 = r106845 - r106856;
        return r106857;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[x - \frac{2.30753 + x \cdot 0.27061000000000002}{1 + \left(0.992290000000000005 + x \cdot 0.044810000000000003\right) \cdot x}\]
  2. Using strategy rm
  3. Applied expm1-log1p-u0.0

    \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{2.30753 + x \cdot 0.27061000000000002}{1 + \left(0.992290000000000005 + x \cdot 0.044810000000000003\right) \cdot x}\right)\right)}\]
  4. Simplified0.0

    \[\leadsto x - \mathsf{expm1}\left(\color{blue}{\mathsf{log1p}\left(\frac{\mathsf{fma}\left(x, 0.27061000000000002, 2.30753\right)}{\mathsf{fma}\left(\mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), x, 1\right)}\right)}\right)\]
  5. Final simplification0.0

    \[\leadsto x - \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\mathsf{fma}\left(x, 0.27061000000000002, 2.30753\right)}{\mathsf{fma}\left(\mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), x, 1\right)}\right)\right)\]

Reproduce

herbie shell --seed 2020045 +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)))))