Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Numeric Limits

std::numeric_limits<> constants
std::numeric_limits<> functions
Numeric limits for 32-bit platform
How to Determine the Kind of a Number From std::numeric_limits

Boost.Multiprecision tries hard to implement std::numeric_limits for all types as far as possible and meaningful because experience with Boost.Math has shown that this aids portability.

The C++ standard library defines std::numeric_limits in section 18.3.2.

This in turn refers to the C standard SC22/WG11 N507 DRAFT INTERNATIONAL ISO/IEC STANDARD WD 10967-1 Information technology Language independent arithmetic Part 1: Integer and floating-point arithmetic.

That C Standard in turn refers to

IEEE754 IEEE Standard for Binary Floating-Point Arithmetic

There is a useful summary at C++ reference.

The chosen backend often determines how completely std::numeric_limits is available.

Compiler options, processor type, and definition of macros or assembler instructions to control denormal numbers will alter the values in the tables given below.

[Warning] Warning

GMP's mpf_t does not have a concept of overflow: operations that lead to overflow eventually run of out of resources and terminate with stack overflow (often after several seconds).


PrevUpHomeNext