Predicates - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


ComplexBox

  

Predicates

  

predicates for ComplexBox objects

  

IsZero

  

test whether a ComplexBox object is zero

  

HasZero

  

test whether a ComplexBox object contains zero

  

IsOne

  

test whether a ComplexBox object is one

  

IsReal

  

test whether a ComplexBox object is real

  

IsExact

  

test whether a ComplexBox object is exact

  

IsInteger

  

test whether a ComplexBox object is an integer

  

HasInteger

  

test whether a ComplexBox object contains an integer

  

IsFinite

  

test whether a ComplexBox object is finite

  

IsInfinity

  

test whether a ComplexBox object is infinity

  

IsUndefined

  

test whether a ComplexBox object is undefined

  

Equal

  

test whether two ComplexBox objects are equal

  

Eq

  

test whether two ComplexBox objects are equal

  

NotEq

  

test whether two ComplexBox objects are not equal

  

Overlaps

  

test whether two ComplexBox objects overlap

  

Contains

  

test whether a ComplexBox object contains another

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

IsZero( b )

HasZero( b )

IsOne( b )

IsReal( b )

IsExact( b )

IsInteger( b )

HasInteger( b )

IsFinite( b )

IsInfinity( b )

IsUndefined( b )

Equal( b1, b2 )

Eq( b1, b2 )

NotEq( b1, b2 )

Overlaps( b1, b2 )

Contains( b1, b2 )

Parameters

b

-

ComplexBox object

b1

-

ComplexBox object

b2

-

ComplexBox object

precopt

-

(optional) equation of the form precision = n, where n is a positive integer

Description

• 

Each ComplexBox object defines a number of predicates that can be used to query various properties of the box.

• 

Predicates may be further sub-divided into unary predicates (of a single ComplexBox object) or binary (for comparing two ComplexBox objects).

• 

The following table describes briefly the defined unary predicates.

Predicate

Description

IsZero

returns true if the ComplexBox represents an exact zero (centers and radii are both 0)

HasZero

returns true if the ComplexBox contains zero

IsOne

returns true if the ComplexBox represents 1 exactly

IsReal

returns true if the ComplexBox represents a real number (i.e, imaginary part is an exact zero)

IsExact

returns true if the ComplexBox has zero radii

IsInteger

returns true if the ComplexBox has zero radii and integer center

HasInteger

returns true if the ComplexBox contains an integer

IsFinite

returns true if the ComplexBox has finite real and imaginary parts

IsInfinity

returns true if the ComplexBox is a complex infinity

IsUndefined

returns true if the ComplexBox is an undefined

• 

The binary predicates (comparing two ComplexBox objects) that are defined are described briefly in the following table.

Predicate

Description

Equal

returns true if its arguments are identical as boxes

Eq

returns true if its arguments are "mathematically equal"

NotEq

returns true if its arguments are not "mathematically equal"

Overlaps

returns true if its arguments have non-empty intersection

Contains

returns true if the first argument is entirely contained in the second

• 

Use the 'precision' = n option to control the precision used in these methods. For more details on precision, see BoxPrecision.

Examples

IsZeroComplexBox0

true

(1)

IsZeroComplexBox0.

true

(2)

IsZeroComplexBox0.I

true

(3)

IsZeroComplexBox1.×10−40

false

(4)

IsZeroComplexBox1.×10−40I

false

(5)

HasZeroComplexBoxRealBox2.3,1.×10−20,RealBox0

false

(6)

HasZeroComplexBoxRealBox0.001,0.002,RealBox0

true

(7)

IsOneComplexBox1

true

(8)

IsOneComplexBoxRealBox1,1.×10−30

false

(9)

IsOneComplexBox1.0+0.I

true

(10)

IsOneComplexBox1.00.I

true

(11)

IsRealComplexBox2.3

true

(12)

IsRealComplexBox2.3+1.×10−40I

false

(13)

IsRealComplexBoxRealBox2.3,1.×10−20

true

(14)

IsRealComplexBoxRealBox2.3,1.×10−20,RealBox0

true

(15)

IsRealComplexBoxRealBox2.3,1.×10−20,RealBox0,1.×10−30

false

(16)

IsExactComplexBox2.3+5.1I

false

(17)

IsExactComplexBoxRealBox2.3,1.×10−40,RealBox5.1

false

(18)

IsExactComplexBoxRealBox2.3,RealBox5.1,1.×10−30

false

(19)

IsExactComplexBoxRealBox2.3,1.×10−20,RealBox5.1,1.×10−30

false

(20)

IsExactComplexBoxRealBox2.3,RealBox5.1

false

(21)

IsIntegerComplexBox4

true

(22)

IsIntegerComplexBoxRealBox4

true

(23)

This returns false because it is not exact:

IsIntegerComplexBoxRealBox4,1.×10−20

false

(24)

IsIntegerComplexBox4I

false

(25)

HasIntegerComplexBoxRealBox1.001,0.002,RealBox0

true

(26)

HasIntegerComplexBoxRealBox0.5,RealBox1.001,0.002

false

(27)

IsFiniteComplexBox2+3I

true

(28)

IsFiniteComplexBox2+I

false

(29)

IsFiniteComplexBoxFloat3I

false

(30)

IsUndefinedComplexBoxFloatundefinedIFloatundefined

true

(31)

IsUndefinedComplexBoxFloatIFloatundefined

false

(32)

IsUndefinedComplexBoxFloatundefined+IFloat

false

(33)

IsUndefinedComplexBoxRealBox0,,RealBox2.3

false

(34)

IsInfinityComplexBoxFloat3I

false

(35)

IsInfinityComplexBoxFloat+3.2I

false

(36)

IsInfinityComplexBoxFloat+IFloat

true

(37)

IsInfinityComplexBoxFloatIFloat

true

(38)

IsInfinityComplexBoxFloat+IFloat

true

(39)

IsInfinityComplexBoxFloatIFloat

true

(40)

IsInfinityComplexBoxRealBox0,,RealBox0,

false

(41)

Compatibility

• 

The ComplexBox[Predicates], ComplexBox:-IsZero, ComplexBox:-HasZero, ComplexBox:-IsOne, ComplexBox:-IsReal, ComplexBox:-IsExact, ComplexBox:-IsInteger, ComplexBox:-HasInteger, ComplexBox:-IsFinite, ComplexBox:-IsInfinity, ComplexBox:-IsUndefined, ComplexBox:-Equal, ComplexBox:-Eq, ComplexBox:-NotEq, ComplexBox:-Overlaps and ComplexBox:-Contains commands were introduced in Maple 2022.

• 

For more information on Maple 2022 changes, see Updates in Maple 2022.

See Also

ComplexBox

RealBox

RealBox[BinaryPredicates]

RealBox[UnaryPredicates]