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

Online Help

All Products    Maple    MapleSim


sign

sign of a number or a polynomial

 

Calling Sequence

Parameters

Description

Thread Safety

Examples

Calling Sequence

sign(expr, [x1, x2, ...], 'y')

Parameters

expr

-

multivariate polynomial

[x1, ...]

-

(optional) list of indeterminates

y

-

(optional) unevaluated name

Description

• 

The sign function computes the sign of the leading coefficient of expr. The sign function works for polynomials with coefficients of type `numeric`. It does not take assumptions into account.

• 

The leading coefficient of expr is determined with respect to the indeterminates given.  If none are given, the leading coefficient is taken with respect to all its indeterminates.  Note therefore that the leading coefficient is dependent on the order of the indeterminates which may vary from one Maple session to another, but not within a session.

• 

The unevaluated name specified as the optional third argument is assigned the leading term.

Thread Safety

• 

The sign command is thread-safe as of Maple 15 .

• 

For more information on thread safety, see index/threadsafe.

Examples

sign0

1

(1)

sign23

−1

(2)

expr3x2y42xy5+x

expr3x2y42xy5+x

(3)

indetsexpr

x,y

(4)

signexpr

1

(5)

signexpr,x,y

1

(6)

signexpr,y,x

−1

(7)

signexpr,y,x,a

−1

(8)

a

xy5

(9)

You can also plot the sign function. A first attempt:

plotsignx,x=1..1

Notice that the plot results in the line y=1.  This occurs because it computes the constant sign(x)=1 and plots that. To get the expected plot, enclose sign(x) in right-single quotes.

plotsignx,x=1..1

See Also

indets

lcoeff

signum