* - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


type/`+`

check for an expression of type `+`

type/`*`

check for an expression of type `*`

type/`^`

check for an expression of type `^`

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

type(expr, `+`)

type(expr, `*`)

type(expr, `^`)

Parameters

expr

-

any expression

Description

• 

These procedures check for expressions of various arithmetic types. For more information about the arithmetic operations, see arithop.

• 

Subtractions are considered to be of type `+`, and similarly, divisions are of type `*`.

• 

The arithmetic operator must be enclosed in left single quotes in the function call.

• 

The type of an arithmetic operation is determined after automatic simplification of expr occurs.  Therefore, the expression x12 is actually of type `+`, rather than `*`, since after automatic simplification this expression becomes x212.

  

Similarly, the expression 1x is of type `^`, rather than `*`, since the expression is equivalent to x1.  For more information on automatic simplification in Maple, refer to the Maple Expressions chapter of the Maple Programming Guide.

  

Note: type(expr, `^`) is equivalent to type(expr, `**`).

Examples

typex2,`^`

true

(1)

typex+2,`+`

true

(2)

typex+x,`+`

false

(3)

typex+x,`*`

true

(4)

See Also

+, -, *, /, ^

ProgrammingGuide/MapleExpressions

type