What is the range of the long double C++

c++, numbers, primitive-types, types

Solution

`#include <limits>`

std::numeric_limits<long double>::min()
//...
std::numeric_limits<long double>::max()

The definition of `long double` is compiler & platform dependent, it is at least the same as a `double`, thus, it may take 8, 12 (usually also for 80bits) or even 16 bytes (float128/quadruple precision) and has a range according to its size.

Problem

What is the range of long double in C++?

Original source

Related problems