 NumericClass - Maple Programming Help

NumericClass

return the class of x

 Calling Sequence NumericClass(x)

Parameters

 x - expression

Description

 • The NumericClass(x) function returns the class of x represented as a type. The class of x is described by a Maple type that recognizes
 - the computation environment, and
 - the numerical type of x.
 • If x is complex, then NumericClass(x) returns as narrowly constrained a type as possible to recognize x. To obtain precise information about the real and imaginary part of x separately, use NumericClass(Re(x)) and NumericClass(Im(x)).

 • The NumericClass command is thread-safe as of Maple 15.

Examples

 > $\mathrm{NumericClass}\left(0\right)$
 ${\mathrm{rational}}{\wedge }{\mathrm{poszero}}$ (1)
 > $\mathrm{NumericClass}\left(2.3\right)$
 ${\mathrm{sfloat}}{\wedge }{\mathrm{positive}}{\wedge }{\mathrm{numeric}}$ (2)
 > $\mathrm{NumericClass}\left(\mathrm{\infty }\right)$
 ${\mathrm{extended_rational}}{\wedge }{\mathrm{positive}}{\wedge }{\mathrm{\infty }}$ (3)
 > $x≔3-2I$
 ${x}{≔}{3}{-}{2}{}{I}$ (4)
 > $\mathrm{NumericClass}\left(x\right)$
 ${\mathrm{nonreal}}{}\left({\mathrm{posint}}{\vee }{\mathrm{negint}}\right)$ (5)
 > $\mathrm{NumericClass}\left(\mathrm{\Re }\left(x\right)\right)$
 ${\mathrm{posint}}$ (6)
 > $\mathrm{NumericClass}\left(\mathrm{\Im }\left(x\right)\right)$
 ${\mathrm{negint}}$ (7)
 > $\mathrm{NumericClass}\left(2I\right)$
 ${\mathrm{imaginary}}{}\left({\mathrm{posint}}\right)$ (8)
 > $\mathrm{NumericClass}\left(\mathrm{HFloat}\left(-4.5\right)\right)$
 ${{\mathrm{float}}}_{{8}}{\wedge }{\mathrm{negative}}{\wedge }{\mathrm{numeric}}$ (9)
 > $\mathrm{NumericClass}\left(\mathrm{HFloat}\left(-3+5I\right)\right)$
 ${\mathrm{nonreal}}{}\left(\left({{\mathrm{float}}}_{{8}}{\wedge }{\mathrm{negative}}{\wedge }{\mathrm{numeric}}\right){\vee }\left({{\mathrm{float}}}_{{8}}{\wedge }{\mathrm{positive}}{\wedge }{\mathrm{numeric}}\right)\right)$ (10)