 positive - Maple Help

type/positive

check for a positive number

type/negative

check for a negative number

type/nonnegative

check for a non-negative number

type/nonpositive

check for a non-positive number Calling Sequence type(x, positive) type(x, negative) type(x, nonnegative) type(x, nonpositive) Parameters

 x - numeric type Description

 • The functions type(x, positive), type(x, negative), type(x, nonnegative), and type(x, nonpositive) return true if x is a positive, negative, non-negative, or non-positive extended_numeric number, respectively. Otherwise, false is returned. Examples

 > $\mathrm{type}\left(0,\mathrm{positive}\right)$
 ${\mathrm{false}}$ (1)
 > $\mathrm{type}\left(-1.79,\mathrm{negative}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(0,\mathrm{nonnegative}\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(-\mathrm{\infty },\mathrm{nonpositive}\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{type}\left({x}^{2},\mathrm{nonnegative}\right)$
 ${\mathrm{false}}$ (5)
 > $\mathrm{type}\left(\mathrm{sqrt}\left(8\right),\mathrm{positive}\right)$
 ${\mathrm{false}}$ (6)