'dScale 精度,如果满足精度要求则返回结果退出
Function Test(dScale As Double, ParamArray p() As Variant) As Double
Dim sExpression As String
Dim i As Long
Dim pEx As New RegExp
'生成表达式
sExpression = "0"
For i = 0 To UBound(p)
sExpression = sExpression & "+1/(1+x)^" & (i + 1)
Next