The three distinct types
can represent floating-point numbers.
The type double
provides at least as much
precision as float
, and the type long double
least as much precision as double.
The set of values of the type
is a subset of the set of values of the type
; the set of values of the type double
is a subset
of the set of values of the type long double.
representation of floating-point types is
This document imposes no requirements on the accuracy of
floating-point operations; see also [support.limits].
— end note
Integral and floating-point types are collectively
termed arithmetic types.
Specializations of the standard library template
shall specify the
maximum and minimum values of each arithmetic type for an