Average Error: 0.0 → 0.0
Time: 14.0s
Precision: 64
\[x - \frac{2.30753 + x \cdot 0.27061000000000002}{1 + \left(0.992290000000000005 + x \cdot 0.044810000000000003\right) \cdot x}\]
\[x - \mathsf{fma}\left(x, 0.27061000000000002, 2.30753\right) \cdot \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), x, 1\right)}\]
x - \frac{2.30753 + x \cdot 0.27061000000000002}{1 + \left(0.992290000000000005 + x \cdot 0.044810000000000003\right) \cdot x}
x - \mathsf{fma}\left(x, 0.27061000000000002, 2.30753\right) \cdot \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), x, 1\right)}
double f(double x) {
        double r99152 = x;
        double r99153 = 2.30753;
        double r99154 = 0.27061;
        double r99155 = r99152 * r99154;
        double r99156 = r99153 + r99155;
        double r99157 = 1.0;
        double r99158 = 0.99229;
        double r99159 = 0.04481;
        double r99160 = r99152 * r99159;
        double r99161 = r99158 + r99160;
        double r99162 = r99161 * r99152;
        double r99163 = r99157 + r99162;
        double r99164 = r99156 / r99163;
        double r99165 = r99152 - r99164;
        return r99165;
}

double f(double x) {
        double r99166 = x;
        double r99167 = 0.27061;
        double r99168 = 2.30753;
        double r99169 = fma(r99166, r99167, r99168);
        double r99170 = 1.0;
        double r99171 = 0.04481;
        double r99172 = 0.99229;
        double r99173 = fma(r99171, r99166, r99172);
        double r99174 = 1.0;
        double r99175 = fma(r99173, r99166, r99174);
        double r99176 = r99170 / r99175;
        double r99177 = r99169 * r99176;
        double r99178 = r99166 - r99177;
        return r99178;
}

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}{x - \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)}}\]
  3. Using strategy rm
  4. Applied div-inv0.0

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

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

Reproduce

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