equals

Returns true if the operands are equal to the type precision. Finite numbers are equal if they are numerically equal to the type precision. Infinities are equal if they have the same sign. Zeros are equal regardless of sign. A NaN is not equal to any number, not even another NaN. In particular, a decimal NaN is not equal to itself (this != this).

Note: The operands are rounded before they are compared. This may result in unexpected results. For instance, if both operands are too large (small) for the context they will both be rounded to infinity (zero) and the function will return true, indicating that they are equal, even though they are numerically different before rounding.

Flags: INVALID_OPERATION

bool
equals
(
D
)
(
in D left
,
in D right
,
Context context = D.context
)

Meta