Type::NegRat
-- a type and a
property representing negative rational numbersType::NegRat
represents negative rational numbers.
Type::NegRat
is a property, too, which can be used in an
assume
call.
testtype(obj,
Type::NegRat)
assume(x,
Type::NegRat)
is(ex,
Type::NegRat)
obj |
- | any MuPAD object |
x |
- | an identifier or one of the expressions Re(u) or Im(u) with an identifier
u |
ex |
- | an arithmetical expression |
testtype
, is
, assume
, Type::Property
testtype(obj,
Type::NegRat) checks,
whether obj
is a negative rational number and returns
TRUE
, if it holds,
otherwise FALSE
.testtype
only
performs a syntactical test identifying MuPAD objects of type
DOM_INT
and DOM_RAT
and checks, if bool(obj < 0)
holds.assume(x,
Type::NegRat) marks the identifier x
as a negative
rational number.
The call is(ex,
Type::NegRat) derives, whether the expression ex
is a
negative rational number (or this property can be derived).
assume
and is
.The following numbers are of type
Type::NegRat
:
>> testtype(-2, Type::NegRat), testtype(-3/4, Type::NegRat), testtype(-55/111, Type::NegRat), testtype(-1, Type::NegRat), testtype(-111/111111, Type::NegRat)
TRUE, TRUE, TRUE, TRUE, TRUE
Assume an identifier is negative rational:
>> assume(x, Type::NegRat): is(x, Type::NegRat)
TRUE
Also negative rational numbers are rational:
>> assume(x, Type::NegRat): is(x, Type::Rational)
TRUE
However, rational numbers can be negative rational or not:
>> assume(x, Type::Rational): is(x, Type::NegRat)
UNKNOWN
>> delete x: