Type::AlgebraicConstant
-- a type
representing algebraic constantsType::AlgebraicConstant
represents algebraic
constants.
testtype(obj,
Type::AlgebraicConstant)
obj |
- | any MuPAD object |
see testtype
Taken together, these rules characterize algebraic constants over the rationals defined as usual, i.e., as roots of polynomial expressions.
assume
to mark an
identifier as an algebraic constant.The following number is composed of radicals involving rational numbers and therefore is an algebraic constant:
>> testtype((3^(1/2)*I + 1/8)^(1/7), Type::AlgebraicConstant)
TRUE
The following objects are not algebraic constants:
>> testtype(2^I, Type::AlgebraicConstant), testtype(PI, Type::AlgebraicConstant)
FALSE, FALSE
Symbolic objects cannot represent algebraic constants:
>> testtype(x, Type::AlgebraicConstant)
FALSE
The following call selects the algebraic constants in an expression:
>> select(x + PI + 2^(1/2) + I, testtype, Type::AlgebraicConstant)
1/2 2 + I