根据预定义的 Oracle Hyperion Financial Management Epsilon,检查传入的值是否接近于 0。您可以将此函数用于所有类型的规则中。
推荐使用此函数来取代精确的与零比较,后者的浮点算术会带来可能被忽略的小于 1 x 10 E-10 错误。
取代:
Difference = Value1 – Value2
If Difference = 0 Then
'process where Difference = 0
Else
'process where Difference <> 0
End If
使用:
Difference = Value1 – Value2
If HS.IsZero(Difference) Then
'process where Difference = 0
Else
'process where Difference <> 0
End If
语法
BooleanValue = HS.IsZero(Value)
返回值
如果传入的值接近于零,布尔值为 True。否则为 False。
示例
Dim BoolVal
Dim Value
Value = 0.000000001
BoolVal = HS.IsZero(Value)
If BoolVal = true Then
'do processing
Else
'do Processing
End If