type/sqrt - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Data Types : Type Checking : Types : type/sqrt

type/sqrt

check for a square root

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

type(expr, sqrt)

type(expr, 'sqrt'(domain))

Parameters

expr

-

any expression

domain

-

any valid type domain

Description

• 

An expression is of type sqrt if it is a radical and the exponent has a denominator of 2.

• 

An expression is of type sqrt(domain) if it is of type radext(domain) and the exponent has a denominator of 2.

• 

Note that a square root of a product or quotient is not of type sqrt because it evaluates to a product or quotient of square roots.

• 

When used in the second form, it is necessary to enclose sqrt in forward (unevaluation) quotes to prevent the sqrt function from being invoked.

Examples

type512,'sqrt'

true

(1)

type512,'sqrt'integer

true

(2)

typey12,'sqrt'name

true

(3)

type514,sqrt

false

(4)

typex+732,'sqrt'integer

false

(5)

typex+732,'sqrt'polynom

true

(6)

See Also

sqrt

type

type/radext

type/radical