\frac{x}{1 + \sqrt{x + 1}}\begin{array}{l}
\mathbf{if}\;x \le 0.105117093335230435:\\
\;\;\;\;\frac{x}{1 + \mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{x + 1}\right)\right)}\\
\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 VAR;
if ((x <= 0.10511709333523044)) {
VAR = (x / (1.0 + expm1(log1p(sqrt((x + 1.0))))));
} else {
VAR = (sqrt(x) * (sqrt(x) / (1.0 + sqrt((x + 1.0)))));
}
return VAR;
}



Bits error versus x
Results
if x < 0.10511709333523044Initial program 0.0
rmApplied expm1-log1p-u0.0
if 0.10511709333523044 < x Initial program 0.5
rmApplied *-un-lft-identity0.5
Applied add-sqr-sqrt0.1
Applied times-frac0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020092 +o rules:numerics
(FPCore (x)
:name "Numeric.Log:$clog1p from log-domain-0.10.2.1, B"
:precision binary64
(/ x (+ 1 (sqrt (+ x 1)))))