Type::Zero
-- a type and a property
representing zerotesttype(obj,
Type::Zero) is equivalent to iszero(obj)
.
Type::Zero
is a property, too, which can be used in an
assume
call.
testtype(obj,
Type::Zero)
assume(x,
Type::Zero)
is(ex,
Type::Zero)
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::NonZero
testtype(obj,
Type::Zero) is
equivalent to iszero(obj)
, which performs a
syntactical test if obj
is zero. If it is, the call
returns TRUE
, otherwise,
FALSE
is returned.assume(x,
Type::Zero) marks the identifier x
as zero.
The call is(ex,
Type::Zero) derives, whether the expression ex
is zero (or
this property can be derived).
assume
and is
.assume(x =
0)
has the same meaning as assume(x,
Type::Zero).testtype
determines the syntactical
equality to zero:
>> testtype(0.0, Type::Zero)
TRUE
>> testtype(x, Type::Zero)
FALSE
Type::Zero
can be used within assume
and is
:
>> is(x, Type::Zero)
UNKNOWN
Assumption that x
is zero:
>> assume(x, Type::Zero): is(x^2, Type::Zero)
TRUE
The next example shows the difference between testtype
and is
:
>> is(x, Type::Zero), testtype(x, Type::Zero)
TRUE, FALSE
Now the property of x
is removed:
>> delete x: is(x, Type::Zero), testtype(x, Type::Zero)
UNKNOWN, FALSE
A positive number cannot be zero:
>> assume(x > 0): is(x, Type::Zero), testtype(x, Type::Zero)
FALSE, FALSE
But in the next example x
could be
zero:
>> assume(x >= 0): is(x, Type::Zero), testtype(x, Type::Zero)
UNKNOWN, FALSE
>> delete x: