IFC 4.3.2.20240809 (IFC4X3_ADD2) under development

8.9.6.21 IfcSameValue

8.9.6.21.1 Semantic definition

The function compares two numerical values and ensures that they are the same (with an epsilon precision factor). In the function the following questionable ad-hoc value is used: 0.000001 for the default precision (1E-6)

8.9.6.21.2 Formal representation

FUNCTION IfcSameValue
 (Value1, Value2 : REAL; Epsilon : REAL)
 : LOGICAL;
  LOCAL
    ValidEps    : REAL;
    DefaultEps  : REAL := 0.000001;
  END_LOCAL;
  
  ValidEps := NVL(Epsilon, DefaultEps);
  RETURN ((Value1 + ValidEps > Value2) AND (Value1 < Value2 + ValidEps));

END_FUNCTION;

8.9.6.21.3 References

Edit on Github


Is this page difficult to understand? Let us know!