Previous Page Next Page Contents

Type::Complex -- a type and a property representing complex numbers

Introduction

Type::Complex represents complex numbers. This type can also be used as a property to mark identifiers as complex numbers.

Call(s)

testtype(obj, Type::Complex)
assume(x, Type::Complex)
is(ex, Type::Complex)

Parameters

obj - any MuPAD object
x - an identifier
ex - an arithmetical expression

Returns

see assume, is and testtype

Related Functions

assume, is, testtype, Type::Imaginary, Type::Property, Type::Real

Details

Example 1

The following numbers are of type Type::Complex:

>> testtype(2, Type::Complex),
   testtype(3/4, Type::Complex),
   testtype(0.123, Type::Complex),
   testtype(1 + I/3, Type::Complex),
   testtype(1.0 + 2.0*I, Type::Complex)
                       TRUE, TRUE, TRUE, TRUE, TRUE

The following expressions are exact representations of complex numbers. Syntactically, however, they are not of type Type::Complex:

>> testtype(exp(3), Type::Complex),
   testtype(PI^2 + 5, Type::Complex),
   testtype(sin(2) + PI*I, Type::Complex)
                            FALSE, FALSE, FALSE

Example 2

Identifiers may be assumed to represent a complex number:

>> assume(x, Type::Complex): is(x, Type::Complex)
                                   TRUE

The real numbers are a subset of the complex numbers:

>> assume(x, Type::Real): is(x, Type::Complex)
                                   TRUE

Without further information, it cannot be decided whether a complex number is real:

>> assume(x, Type::Complex): is(x, Type::Real)
                                  UNKNOWN
>> unassume(x):

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000