This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
numeric_limits<T>::is_exact is unclearSection: 17.3.5.2 [numeric.limits.members] Status: New Submitter: Jan Schultke Opened: 2026-07-17 Last modified: 2026-07-18
Priority: Not Prioritized
View all other issues in [numeric.limits.members].
View all issues with New status.
Discussion:
The description of the numeric_limits::is_exact member in 17.3.5.2 [numeric.limits.members]
is as follows:
trueif the type uses an exact representation. All integer types are exact, but not all exact types are integer. For example, rational and fixed-exponent representations are exact but not integer.
There is no explanation of what an "exact representation" is, and there is no widely established definition in math. User confusion can be seen on stackoverflow.
It is also extremely surprising that rational and fixed-point representations would be considered exact, considering that unless those are infinite-precision representations (such as fixed-point representation backed by a "big integer" type), sufficiently tiny values obviously cannot be represented. There is no meaningful difference between fixed-point and floating-point types in this regard, other than the size of the gaps between values in the representable subset of real numbers. However counter-intuitive the wording may be, the examples listed match existing practice:
John McFarlane's CNL library
provides is_exact = true for its scaled integer types (fixed-point).
IBM's documentation for Informix Servers describes scaled integers as "exact numeric types" and floating-point types as "approximate numeric data types".
Proposed resolution:
This wording is relative to N5054.
Modify 17.3.5.2 [numeric.limits.members] as indicated:
static constexpr bool is_exact;-20-
[Note: Floating-point representations are not exact because their domain is the (possibly extended) real numbers, and there are infinite values in the domain between any two representable floating-point values. All integer types are exact, but not all exact types are integer. For example,trueif the type uses an exact representation; that is, if there exist no unrepresentable values in the domain of the type that lie between representable values.rational andfixed-exponent representations are exactbut not integerbecause their domain is the scaled integer domain. Rational number representations are exact only if the numerator and denominator are unbounded. — end note] -21- Meaningful for all specializations.