isNotEqual

Compares two _decimal operands for equality

  1. bool isEqual(D1 x, D2 y)
  2. bool isNotEqual(D1 x, D2 y)
    @IEEECompliant("compareSignalingNotEqual", 24)
    bool
    isNotEqual
    (
    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