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{And}}{}\left({\mathrm{rational}}{,}{\mathrm{poszero}}\right)$ (1)
 > $\mathrm{NumericClass}\left(2.3\right)$
 ${\mathrm{And}}{}\left({\mathrm{sfloat}}{,}{\mathrm{positive}}{,}{\mathrm{numeric}}\right)$ (2)
 > $\mathrm{NumericClass}\left(\mathrm{∞}\right)$
 ${\mathrm{And}}{}\left({\mathrm{extended_rational}}{,}{\mathrm{positive}}{,}{\mathrm{∞}}\right)$ (3)
 > $x≔3-2I$
 ${x}{≔}{3}{-}{2}{}{I}$ (4)
 > $\mathrm{NumericClass}\left(x\right)$
 ${\mathrm{nonreal}}{}\left({\mathrm{Or}}{}\left({\mathrm{posint}}{,}{\mathrm{negint}}\right)\right)$ (5)
 > $\mathrm{NumericClass}\left(\mathrm{ℜ}\left(x\right)\right)$
 ${\mathrm{posint}}$ (6)
 > $\mathrm{NumericClass}\left(\mathrm{ℑ}\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{And}}{}\left({\mathrm{float}}{[}{8}{]}{,}{\mathrm{negative}}{,}{\mathrm{numeric}}\right)$ (9)
 > $\mathrm{NumericClass}\left(\mathrm{HFloat}\left(-3+5I\right)\right)$
 ${\mathrm{nonreal}}{}\left({\mathrm{Or}}{}\left({\mathrm{And}}{}\left({\mathrm{float}}{[}{8}{]}{,}{\mathrm{negative}}{,}{\mathrm{numeric}}\right){,}{\mathrm{And}}{}\left({\mathrm{float}}{[}{8}{]}{,}{\mathrm{positive}}{,}{\mathrm{numeric}}\right)\right)\right)$ (10)