Name

FLT_ROUNDS macro — Rounding mode

Synopsis

int FLT_ROUNDS
               

The FLT_ROUNDS macro specifies how the implementation rounds floating-point numbers. Table 13-2 lists the possible values as defined in the C++ standard. An implementation can define additional values with other meanings.

Table 13-2. Floating-point rounding mode

Value

Description

-1

Indeterminable

0

Rounds toward 0

1

Rounds to nearest

2

Rounds up (toward positive infinity)

3

Rounds down (toward negative infinity)

Get C++ In a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.