(FPCore (x) :precision binary64 (/ x (+ 1.0 (sqrt (+ x 1.0)))))
(FPCore (x) :precision binary64 (/ x (+ 1.0 (sqrt (+ 1.0 x)))))
double code(double x) {
return x / (1.0 + sqrt((x + 1.0)));
}
double code(double x) {
return x / (1.0 + sqrt((1.0 + x)));
}
real(8) function code(x)
real(8), intent (in) :: x
code = x / (1.0d0 + sqrt((x + 1.0d0)))
end function
real(8) function code(x)
real(8), intent (in) :: x
code = x / (1.0d0 + sqrt((1.0d0 + x)))
end function
public static double code(double x) {
return x / (1.0 + Math.sqrt((x + 1.0)));
}
public static double code(double x) {
return x / (1.0 + Math.sqrt((1.0 + x)));
}
def code(x): return x / (1.0 + math.sqrt((x + 1.0)))
def code(x): return x / (1.0 + math.sqrt((1.0 + x)))
function code(x) return Float64(x / Float64(1.0 + sqrt(Float64(x + 1.0)))) end
function code(x) return Float64(x / Float64(1.0 + sqrt(Float64(1.0 + x)))) end
function tmp = code(x) tmp = x / (1.0 + sqrt((x + 1.0))); end
function tmp = code(x) tmp = x / (1.0 + sqrt((1.0 + x))); end
code[x_] := N[(x / N[(1.0 + N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_] := N[(x / N[(1.0 + N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{x}{1 + \sqrt{x + 1}}
\frac{x}{1 + \sqrt{1 + x}}



Bits error versus x
Results
Initial program 0.2
Applied *-un-lft-identity_binary640.2
Applied add-sqr-sqrt_binary6422.0
Applied times-frac_binary6422.0
Simplified22.0
Applied *-un-lft-identity_binary6422.0
Applied sqrt-prod_binary6422.0
Applied associate-*l*_binary6422.0
Simplified0.2
Final simplification0.2
herbie shell --seed 2022131
(FPCore (x)
:name "Numeric.Log:$clog1p from log-domain-0.10.2.1, B"
:precision binary64
(/ x (+ 1.0 (sqrt (+ x 1.0)))))