Average Error: 0.2 → 0.2
Time: 14.1s
Precision: 64
\[\frac{x}{1 + \sqrt{x + 1}}\]
\[\frac{x}{1 + \sqrt{x + 1}}\]
\frac{x}{1 + \sqrt{x + 1}}
\frac{x}{1 + \sqrt{x + 1}}
double f(double x) {
        double r107234 = x;
        double r107235 = 1.0;
        double r107236 = r107234 + r107235;
        double r107237 = sqrt(r107236);
        double r107238 = r107235 + r107237;
        double r107239 = r107234 / r107238;
        return r107239;
}

double f(double x) {
        double r107240 = x;
        double r107241 = 1.0;
        double r107242 = r107240 + r107241;
        double r107243 = sqrt(r107242);
        double r107244 = r107241 + r107243;
        double r107245 = r107240 / r107244;
        return r107245;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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

    \[\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}{\left(\left(1 \cdot 1 + \left(x + 1\right)\right) - 1 \cdot \sqrt{x + 1}\right) \cdot 1}}}{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.2

    \[\leadsto \frac{x}{1 + \sqrt{x + 1}}\]

Reproduce

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