Average Error: 0.0 → 0.0
Time: 4.0s
Precision: 64
\[x - \frac{2.30753 + x \cdot 0.27061000000000002}{1 + \left(0.992290000000000005 + x \cdot 0.044810000000000003\right) \cdot x}\]
\[x - \log \left({\left(e^{\frac{1}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right) \cdot 1}}\right)}^{\left(\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)\right)}\right)\]
x - \frac{2.30753 + x \cdot 0.27061000000000002}{1 + \left(0.992290000000000005 + x \cdot 0.044810000000000003\right) \cdot x}
x - \log \left({\left(e^{\frac{1}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right) \cdot 1}}\right)}^{\left(\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)\right)}\right)
double f(double x) {
        double r116109 = x;
        double r116110 = 2.30753;
        double r116111 = 0.27061;
        double r116112 = r116109 * r116111;
        double r116113 = r116110 + r116112;
        double r116114 = 1.0;
        double r116115 = 0.99229;
        double r116116 = 0.04481;
        double r116117 = r116109 * r116116;
        double r116118 = r116115 + r116117;
        double r116119 = r116118 * r116109;
        double r116120 = r116114 + r116119;
        double r116121 = r116113 / r116120;
        double r116122 = r116109 - r116121;
        return r116122;
}

double f(double x) {
        double r116123 = x;
        double r116124 = 1.0;
        double r116125 = 0.04481;
        double r116126 = 0.99229;
        double r116127 = fma(r116125, r116123, r116126);
        double r116128 = 1.0;
        double r116129 = fma(r116123, r116127, r116128);
        double r116130 = r116129 * r116124;
        double r116131 = r116124 / r116130;
        double r116132 = exp(r116131);
        double r116133 = 0.27061;
        double r116134 = 2.30753;
        double r116135 = fma(r116133, r116123, r116134);
        double r116136 = pow(r116132, r116135);
        double r116137 = log(r116136);
        double r116138 = r116123 - r116137;
        return r116138;
}

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 add-log-exp0.0

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

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

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

Reproduce

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