Skip to content

Commit 69e7b6b

Browse files
committed
extend Decimal API
1 parent 88d99b6 commit 69e7b6b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

source/mir/bignum/decimal.d

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -967,15 +967,21 @@ struct Decimal(uint maxSize64)
967967
}
968968

969969
///
970-
bool isNaN() const @property
970+
bool isNaN() scope const @property
971971
{
972972
return exponent == exponent.max && coefficient.length;
973973
}
974974

975975
///
976-
bool isInfinity() const @property
976+
bool isInfinity() scope const @property
977977
{
978-
return exponent == exponent.max && !coefficient.length;
978+
return exponent == exponent.max && coefficient.length == 0;
979+
}
980+
981+
///
982+
bool isSpecial() scope const @property
983+
{
984+
return exponent == exponent.max;
979985
}
980986

981987
///

0 commit comments

Comments
 (0)