Checks to see if the passed in value is close to zero based on a predefined Financial Management epsilon. This function can be used in all types of rules.
This function is recommended instead of an exact comparison to zero where floating point arithmetic introduces errors of less than 1 x 10 E-10 that can be ignored.
Instead of:
Difference = Value1 – Value2
If Difference = 0 Then
‘process where Difference = 0
Else
‘process where Difference <> 0
End IfUse:
Difference = Value1 – Value2
If HS.IsZero(Difference) Then
‘process where Difference = 0
Else
‘process where Difference <> 0
End IfBooleanValue = HS.IsZero(Value)
A Boolean that is True if the passed in value is close to zero. False otherwise.