Type::Numeric
-- a type for
testing numerical objectsWith Type::Numeric
, numeric objects (numbers) can be
identified.
testtype(obj,
Type::Numeric)
obj |
- | any MuPAD object |
see testtype
assume
, is
, testtype
, Type::Complex
testtype(obj,
Type::Numeric)
checks, whether obj
is a number and returns TRUE
, if it holds, otherwise FALSE
.DOM_INT
, DOM_RAT
, DOM_FLOAT
or DOM_COMPLEX
.The following objects are numbers.
>> testtype(2, Type::Numeric), testtype(3/4, Type::Numeric), testtype(0.123, Type::Numeric), testtype(1 + I/3, Type::Numeric), testtype(1.0 + 2.0*I, Type::Numeric)
TRUE, TRUE, TRUE, TRUE, TRUE
The following objects are not numerical objects.
>> testtype(ln(2), Type::Numeric), testtype(sin(3/4), Type::Numeric), testtype(x + I/3, Type::Numeric)
FALSE, FALSE, FALSE