Type::Numeric -- a type for
testing numerical objects
IntroductionWith Type::Numeric, numeric objects (numbers) can be
identified.
Call(s)testtype(obj, Type::Numeric)
Parametersobj |
- | any MuPAD object |
Returnssee testtype
Related
Functionsassume, is, testtype, Type::Complex
Detailstesttype(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.
Example
1The 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