Type::Arithmetical
-- a
type representing arithmetical objectsType::Arithmetical
represents arithmetical objects.
testtype(obj,
Type::Arithmetical)
obj |
- | any MuPAD object |
see testtype
infinity
and elements of certain library domains. In particular, the latter
include rectform
objects and series expansions of domain type Series::Puiseux
.assume
to mark an
identifier as an arithmetical object.Numbers and expressions are regarded as arithmetical objects:
>> testtype(3 + I, Type::Arithmetical), testtype(x + sqrt(2) + I*PI, Type::Arithmetical), testtype(x/y + y/x, Type::Arithmetical)
TRUE, TRUE, TRUE
Equations and inequalities are not regarded as arithmetical objects:
>> testtype(x^2 = 2, Type::Arithmetical), testtype(x <> 2, Type::Arithmetical), testtype(x < 2, Type::Arithmetical), testtype(x >= 2, Type::Arithmetical)
FALSE, FALSE, FALSE, FALSE
Sets, lists, tables and arrays are not arithmetical:
>> testtype({a, b, c}, Type::Arithmetical), testtype(array(1..1, [x]), Type::Arithmetical)
FALSE, FALSE
However, domain objects such as matrices of some matrix domain are arithmetical:
>> testtype(Dom::Matrix()([[1, 2], [3, 4]]), Type::Arithmetical)
TRUE