isEqual

Compares two _decimal operands for equality

@IEEECompliant("compareSignalingEqual", 24)
bool
isEqual
(
D1
D2
)
(
auto const ref D1 x
,
auto const ref D2 y
)
if (
isDecimal!(D1, D2)
)

Return Value

Type: bool

true if the specified condition is satisfied, false otherwise or if any of the operands is NaN. Notes: By default, Decimal.opEquals is silent, returning false if a NaN value is encountered. isEqual and isNotEqual will throw InvalidOperationException or will set the ExceptionFlags.invalidOperation context flag if a trap is not set.

Examples

assert (isEqual(decimal32.max, decimal32.max));
assert (isNotEqual(decimal32.max, decimal32.min_normal));

Meta