beautypg.com

Numeric limit members, Members common to all types – HP Integrity NonStop H-Series User Manual

Page 243

background image

Click on the banner to return to the user guide home page.

©Copyright 1996 Rogue Wave Software

Numeric Limit Members

Since a number of the fields in the numeric_limits structure are meaningful only for floating
point values, it is useful to separate the description of the members into common fields and
floating-point specific fields.

Members Common to All Types

The following table summarizes the information available through the

numeric_limits

static

member data fields and functions.

Type Name

Meaning

bool

is_specialized true if a specialization exists, false otherwise

T

min()

smallest finite value

T

max()

largest finite value

int

radix

the base of the representation

int

digits

number of radix digits that can be represented without change

int

digits10

number of base-10 digits that can be represented without change

bool

is_signed

true if the type is signed

bool

is_integer

true if the type is integer

bool

is_exact

true if the representation is exact

bool

is_bounded

true if representation is finite

bool

is_modulo

true if type is modulo

bool

traps

true if trapping is implemented for the type

Radix represents the internal base for the representation. For example, most machines use a
base 2 radix for integer data values, however some may also support a representation, such as
BCD, that uses a different base. The digits field then represents the number of such radix values
that can be held in a value. For an integer type, this would be the number of non-sign bits in the

This manual is related to the following products: