Average Error: 0.2 → 0.0
Time: 5.7s
Precision: 64
\[\frac{x}{1 + \sqrt{x + 1}}\]
\[\begin{array}{l} \mathbf{if}\;x \le 8.62654869172318706 \cdot 10^{-11}:\\ \;\;\;\;\frac{x}{1 + \sqrt[3]{{\left(\sqrt{x + 1}\right)}^{3}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot \frac{\sqrt{x}}{1 + \sqrt{x + 1}}\\ \end{array}\]
\frac{x}{1 + \sqrt{x + 1}}
\begin{array}{l}
\mathbf{if}\;x \le 8.62654869172318706 \cdot 10^{-11}:\\
\;\;\;\;\frac{x}{1 + \sqrt[3]{{\left(\sqrt{x + 1}\right)}^{3}}}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \frac{\sqrt{x}}{1 + \sqrt{x + 1}}\\

\end{array}
double code(double x) {
	return (x / (1.0 + sqrt((x + 1.0))));
}
double code(double x) {
	double temp;
	if ((x <= 8.626548691723187e-11)) {
		temp = (x / (1.0 + cbrt(pow(sqrt((x + 1.0)), 3.0))));
	} else {
		temp = (sqrt(x) * (sqrt(x) / (1.0 + sqrt((x + 1.0)))));
	}
	return temp;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if x < 8.626548691723187e-11

    1. Initial program 0.0

      \[\frac{x}{1 + \sqrt{x + 1}}\]
    2. Using strategy rm
    3. Applied add-cbrt-cube0.0

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

      \[\leadsto \frac{x}{1 + \sqrt[3]{\color{blue}{{\left(\sqrt{x + 1}\right)}^{3}}}}\]

    if 8.626548691723187e-11 < x

    1. Initial program 0.5

      \[\frac{x}{1 + \sqrt{x + 1}}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity0.5

      \[\leadsto \frac{x}{\color{blue}{1 \cdot \left(1 + \sqrt{x + 1}\right)}}\]
    4. Applied add-sqr-sqrt0.1

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

      \[\leadsto \color{blue}{\frac{\sqrt{x}}{1} \cdot \frac{\sqrt{x}}{1 + \sqrt{x + 1}}}\]
    6. Simplified0.1

      \[\leadsto \color{blue}{\sqrt{x}} \cdot \frac{\sqrt{x}}{1 + \sqrt{x + 1}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le 8.62654869172318706 \cdot 10^{-11}:\\ \;\;\;\;\frac{x}{1 + \sqrt[3]{{\left(\sqrt{x + 1}\right)}^{3}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot \frac{\sqrt{x}}{1 + \sqrt{x + 1}}\\ \end{array}\]

Reproduce

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