Average Error: 0.0 → 0.0
Time: 2.4s
Precision: 64
\[x - \frac{2.30753 + x \cdot 0.27061000000000002}{1 + \left(0.992290000000000005 + x \cdot 0.044810000000000003\right) \cdot x}\]
\[\mathsf{fma}\left(-\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right), \frac{1}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)}, x\right)\]
x - \frac{2.30753 + x \cdot 0.27061000000000002}{1 + \left(0.992290000000000005 + x \cdot 0.044810000000000003\right) \cdot x}
\mathsf{fma}\left(-\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right), \frac{1}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)}, x\right)
double f(double x) {
        double r81912 = x;
        double r81913 = 2.30753;
        double r81914 = 0.27061;
        double r81915 = r81912 * r81914;
        double r81916 = r81913 + r81915;
        double r81917 = 1.0;
        double r81918 = 0.99229;
        double r81919 = 0.04481;
        double r81920 = r81912 * r81919;
        double r81921 = r81918 + r81920;
        double r81922 = r81921 * r81912;
        double r81923 = r81917 + r81922;
        double r81924 = r81916 / r81923;
        double r81925 = r81912 - r81924;
        return r81925;
}

double f(double x) {
        double r81926 = 0.27061;
        double r81927 = x;
        double r81928 = 2.30753;
        double r81929 = fma(r81926, r81927, r81928);
        double r81930 = -r81929;
        double r81931 = 1.0;
        double r81932 = 0.04481;
        double r81933 = 0.99229;
        double r81934 = fma(r81932, r81927, r81933);
        double r81935 = 1.0;
        double r81936 = fma(r81927, r81934, r81935);
        double r81937 = r81931 / r81936;
        double r81938 = fma(r81930, r81937, r81927);
        return r81938;
}

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

    \[\leadsto \color{blue}{\frac{-\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)} + x}\]
  3. Using strategy rm
  4. Applied div-inv0.0

    \[\leadsto \color{blue}{\left(-\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)\right) \cdot \frac{1}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)}} + x\]
  5. Applied fma-def0.0

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

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

Reproduce

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