XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ Sqrt1pm1_sub()

Sub Sqrt1pm1_sub ( Ret As  Double,
X As  Double,
Optional Info As  Long 
)

sqrt(1 + x) - 1 (Subroutine version)

Purpose
Evaluates sqrt(1 + x) - 1 accurately in the sense of relative error when x is very small.
Parameters
[out]Retsqrt(1 + x) - 1.
[in]XArgument x. (X >= -1)
[out]Info(Optional)
= 0: Successful exit.
= -1: The argument X had an illegal value. (X < -1)
= 1: Floating point range error.
Reference
boost/math/special_functions