Returns the largest finite value that A
can represent, if one exists.
Returns the largest finite value that A
can represent, if one exists.
For instance, the largest finite value representable by Double
is
1.7976931348623157E308
. On the other hand, BigInt
has no largest
value.
Returns the smallest finite value that A
can represent, if one exists.
Returns the smallest finite value that A
can represent, if one exists.
For instance, the smallest finite value representable by Double
is
-1.7976931348623157E308
. On the other hand, BigInt
has no smallest
value.
If A
has values that represent an undefined or invalid value, then a
repsentitive value may be used here.
If A
has values that represent an undefined or invalid value, then a
repsentitive value may be used here. Otherwise this returned None
to
indicate that all values in A
are valid numbers in the extended real
number line.
If A
has a value that represents a negative infinity, then it is
returned here, otherwise a value of None
indicates that negative
infinity cannot be represented in A
.
If A
has a value that represents a positive infinity, then it is
returned here, otherwise a value of None
indicates that positive
infinity cannot be represented in A
.
If A
has a value that represents the real value 0, then it is returned
here.
If A
has a value that represents the real value 0, then it is returned
here. Otherwise None
is returned.
Returns true
if a
is an infinite value (either positive or negative)
and false otherwise.
Returns true
if a
is an invalid number.
Returns true
if a
is an invalid number. Note that positive and
negative infinities are valid numbers.
Returns true if A
can represent both positive and negative values.
Returns true if this value can overflow as a result of arithmetic operations.
Returns true if this value can overflow as a result of arithmetic
operations. Types that overflow include Int
and Long
.
Returns the resolution of this number.
Returns true if all values representable by A
are finite and live on the
real number line.
Returns true if this type can represent arbitrarily large or small values.
Returns true
if a
represents a finite value (neither infinite nor
invalid).
A
NumberTag
provides information about important implementations details of numbers. For instance, it includes information about whether we can expect arithmetic to overflow or produce invalid values, the bounds of the number if they exist, whether it is an approximate or exact number type, etc.