Average Error: 0.2 → 0.1
Time: 8.1s
Precision: 64
\[\frac{x}{1 + \sqrt{x + 1}}\]
\[\left(\frac{1}{\mathsf{fma}\left(1, 1, \left(x + 1\right) - 1 \cdot \sqrt{x + 1}\right)} \cdot \frac{x}{1 + \sqrt{x + 1}}\right) \cdot \left(1 \cdot 1 + \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - 1 \cdot \sqrt{x + 1}\right)\right)\]
\frac{x}{1 + \sqrt{x + 1}}
\left(\frac{1}{\mathsf{fma}\left(1, 1, \left(x + 1\right) - 1 \cdot \sqrt{x + 1}\right)} \cdot \frac{x}{1 + \sqrt{x + 1}}\right) \cdot \left(1 \cdot 1 + \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - 1 \cdot \sqrt{x + 1}\right)\right)
double f(double x) {
        double r135259 = x;
        double r135260 = 1.0;
        double r135261 = r135259 + r135260;
        double r135262 = sqrt(r135261);
        double r135263 = r135260 + r135262;
        double r135264 = r135259 / r135263;
        return r135264;
}

double f(double x) {
        double r135265 = 1.0;
        double r135266 = 1.0;
        double r135267 = x;
        double r135268 = r135267 + r135266;
        double r135269 = sqrt(r135268);
        double r135270 = r135266 * r135269;
        double r135271 = r135268 - r135270;
        double r135272 = fma(r135266, r135266, r135271);
        double r135273 = r135265 / r135272;
        double r135274 = r135266 + r135269;
        double r135275 = r135267 / r135274;
        double r135276 = r135273 * r135275;
        double r135277 = r135266 * r135266;
        double r135278 = r135269 * r135269;
        double r135279 = r135278 - r135270;
        double r135280 = r135277 + r135279;
        double r135281 = r135276 * r135280;
        return r135281;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.2

    \[\frac{x}{1 + \sqrt{x + 1}}\]
  2. Using strategy rm
  3. Applied flip3-+7.0

    \[\leadsto \frac{x}{\color{blue}{\frac{{1}^{3} + {\left(\sqrt{x + 1}\right)}^{3}}{1 \cdot 1 + \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - 1 \cdot \sqrt{x + 1}\right)}}}\]
  4. Applied associate-/r/7.0

    \[\leadsto \color{blue}{\frac{x}{{1}^{3} + {\left(\sqrt{x + 1}\right)}^{3}} \cdot \left(1 \cdot 1 + \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - 1 \cdot \sqrt{x + 1}\right)\right)}\]
  5. Using strategy rm
  6. Applied sum-cubes7.0

    \[\leadsto \frac{x}{\color{blue}{\left(1 \cdot 1 + \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - 1 \cdot \sqrt{x + 1}\right)\right) \cdot \left(1 + \sqrt{x + 1}\right)}} \cdot \left(1 \cdot 1 + \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - 1 \cdot \sqrt{x + 1}\right)\right)\]
  7. Applied *-un-lft-identity7.0

    \[\leadsto \frac{\color{blue}{1 \cdot x}}{\left(1 \cdot 1 + \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - 1 \cdot \sqrt{x + 1}\right)\right) \cdot \left(1 + \sqrt{x + 1}\right)} \cdot \left(1 \cdot 1 + \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - 1 \cdot \sqrt{x + 1}\right)\right)\]
  8. Applied times-frac0.2

    \[\leadsto \color{blue}{\left(\frac{1}{1 \cdot 1 + \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - 1 \cdot \sqrt{x + 1}\right)} \cdot \frac{x}{1 + \sqrt{x + 1}}\right)} \cdot \left(1 \cdot 1 + \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - 1 \cdot \sqrt{x + 1}\right)\right)\]
  9. Simplified0.1

    \[\leadsto \left(\color{blue}{\frac{1}{\mathsf{fma}\left(1, 1, \left(x + 1\right) - 1 \cdot \sqrt{x + 1}\right)}} \cdot \frac{x}{1 + \sqrt{x + 1}}\right) \cdot \left(1 \cdot 1 + \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - 1 \cdot \sqrt{x + 1}\right)\right)\]
  10. Final simplification0.1

    \[\leadsto \left(\frac{1}{\mathsf{fma}\left(1, 1, \left(x + 1\right) - 1 \cdot \sqrt{x + 1}\right)} \cdot \frac{x}{1 + \sqrt{x + 1}}\right) \cdot \left(1 \cdot 1 + \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - 1 \cdot \sqrt{x + 1}\right)\right)\]

Reproduce

herbie shell --seed 2020046 +o rules:numerics
(FPCore (x)
  :name "Numeric.Log:$clog1p from log-domain-0.10.2.1, B"
  :precision binary64
  (/ x (+ 1 (sqrt (+ x 1)))))