 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

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