Average Error: 0.2 → 0.1
Time: 8.1s
Precision: 64
\[\frac{x}{1 + \sqrt{x + 1}}\]
\[\frac{\frac{x}{\mathsf{fma}\left(1, 1, \left(x + 1\right) - 1 \cdot \sqrt{x + 1}\right)}}{1 + \sqrt{x + 1}} \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}}
\frac{\frac{x}{\mathsf{fma}\left(1, 1, \left(x + 1\right) - 1 \cdot \sqrt{x + 1}\right)}}{1 + \sqrt{x + 1}} \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 r104903 = x;
        double r104904 = 1.0;
        double r104905 = r104903 + r104904;
        double r104906 = sqrt(r104905);
        double r104907 = r104904 + r104906;
        double r104908 = r104903 / r104907;
        return r104908;
}

double f(double x) {
        double r104909 = x;
        double r104910 = 1.0;
        double r104911 = r104909 + r104910;
        double r104912 = sqrt(r104911);
        double r104913 = r104910 * r104912;
        double r104914 = r104911 - r104913;
        double r104915 = fma(r104910, r104910, r104914);
        double r104916 = r104909 / r104915;
        double r104917 = r104910 + r104912;
        double r104918 = r104916 / r104917;
        double r104919 = r104910 * r104910;
        double r104920 = r104912 * r104912;
        double r104921 = r104920 - r104913;
        double r104922 = r104919 + r104921;
        double r104923 = r104918 * r104922;
        return r104923;
}

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.2

    \[\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.2

    \[\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.2

    \[\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 associate-/r*0.2

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

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

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

Reproduce

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