diff --git a/source/future.tex b/source/future.tex index ed1f72b95d..565272cfd9 100644 --- a/source/future.tex +++ b/source/future.tex @@ -218,6 +218,48 @@ unless the function's \throws element specifies throwing an exception when the precondition is violated. +\rSec1[depr.numeric.limits.has.denorm]{\tcode{has_denorm} members in \tcode{numeric_limits}} + +\pnum +The following type is defined +in addition to those specified in \libheaderref{limits}: +\indexlibraryglobal{float_denorm_style}% +\begin{codeblock} +namespace std { + enum float_denorm_style { + denorm_indeterminate = -1, + denorm_absent = 0, + denorm_present = 1 + }; +} +\end{codeblock} + +\pnum +\indextext{denormalized value|see{number, subnormal}}% +\indextext{value!denormalized|see{number, subnormal}}% +\indextext{subnormal number|see{number, subnormal}}% +\indextext{number!subnormal}% +The following members are defined +in addition to those specified in \ref{numeric.limits.general}: +\begin{codeblock} +static constexpr float_denorm_style has_denorm = denorm_absent; +static constexpr bool has_denorm_loss = false; +\end{codeblock} + +\pnum +The values of \tcode{has_denorm} and \tcode{has_denorm_loss} of +specializations of \tcode{numeric_limits} are unspecified. + +\pnum +The following members of the specialization \tcode{numeric_limits} are defined +in addition to those specified in \ref{numeric.special}: +\indexlibrarymember{float_denorm_style}{numeric_limits}% +\indexlibrarymember{has_denorm_loss}{numeric_limits}% +\begin{codeblock} +static constexpr float_denorm_style has_denorm = denorm_absent; +static constexpr bool has_denorm_loss = false; +\end{codeblock} + \rSec1[depr.c.macros]{Deprecated C macros} \pnum diff --git a/source/support.tex b/source/support.tex index 8c68f16620..aacf7bd92b 100644 --- a/source/support.tex +++ b/source/support.tex @@ -759,14 +759,12 @@ \indextext{\idxcode{numeric_limits}}% \indexlibraryglobal{numeric_limits}% \indexlibraryglobal{float_round_style}% -\indexlibraryglobal{float_denorm_style}% \begin{codeblock} // all freestanding namespace std { - // \ref{fp.style}, floating-point type properties + // \ref{round.style}, enumeration \tcode{float_round_style} enum float_round_style; - enum float_denorm_style; // \ref{numeric.limits}, class template \tcode{numeric_limits} template class numeric_limits; @@ -800,9 +798,7 @@ } \end{codeblock} -\rSec2[fp.style]{Floating-point type properties} - -\rSec3[round.style]{Type \tcode{float_round_style}} +\rSec2[round.style]{Enum \tcode{float_round_style}} \indexlibraryglobal{float_round_style}% \begin{codeblock} @@ -843,41 +839,6 @@ if the rounding style is toward negative infinity \end{itemize} -\rSec3[denorm.style]{Type \tcode{float_denorm_style}} - -\indexlibraryglobal{float_denorm_style}% -\begin{codeblock} -namespace std { - enum float_denorm_style { - denorm_indeterminate = -1, - denorm_absent = 0, - denorm_present = 1 - }; -} -\end{codeblock} - -\indextext{denormalized value|see{number, subnormal}}% -\indextext{value!denormalized|see{number, subnormal}}% -\indextext{subnormal number|see{number, subnormal}}% -\indextext{number!subnormal}% -\pnum -The presence or absence of subnormal numbers (variable number of exponent bits) -is characterized by the values: -\begin{itemize} -\item -\indexlibraryglobal{denorm_indeterminate}% -\tcode{denorm_indeterminate} -if it cannot be determined whether or not the type allows subnormal values -\item -\indexlibraryglobal{denorm_absent}% -\tcode{denorm_absent} -if the type does not allow subnormal values -\item -\indexlibraryglobal{denorm_present}% -\tcode{denorm_present} -if the type does allow subnormal values -\end{itemize} - \rSec2[numeric.limits]{Class template \tcode{numeric_limits}} \rSec3[numeric.limits.general]{General} @@ -918,8 +879,6 @@ static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; - static constexpr float_denorm_style has_denorm = denorm_absent; - static constexpr bool has_denorm_loss = false; static constexpr T infinity() noexcept { return T(); } static constexpr T quiet_NaN() noexcept { return T(); } static constexpr T signaling_NaN() noexcept { return T(); } @@ -1340,46 +1299,6 @@ \tcode{is_iec559 != false}. \end{itemdescr} -\indexlibrarymember{float_denorm_style}{numeric_limits}% -\begin{itemdecl} -static constexpr float_denorm_style has_denorm; -\end{itemdecl} - -\indextext{number!subnormal}% -\begin{itemdescr} -\pnum -\tcode{denorm_present} -if the type allows subnormal values -(variable number of exponent bits), -\begin{footnote} -Required by LIA-1. -\end{footnote} -\tcode{denorm_absent} -if the type does not allow subnormal values, -and -\tcode{denorm_indeterminate} -if it is indeterminate at compile time whether the type allows -subnormal values. - -\pnum -Meaningful for all floating-point types. -\end{itemdescr} - -\indexlibrarymember{has_denorm_loss}{numeric_limits}% -\begin{itemdecl} -static constexpr bool has_denorm_loss; -\end{itemdecl} - -\begin{itemdescr} -\pnum -\tcode{true} if loss of accuracy is detected as a -denormalization loss, rather than as an inexact result. -\begin{footnote} -See -ISO/IEC/IEEE 60559. -\end{footnote} -\end{itemdescr} - \indexlibrarymember{infinity}{numeric_limits}% \begin{itemdecl} static constexpr T infinity() noexcept; @@ -1445,18 +1364,14 @@ \begin{itemdescr} \indextext{number!subnormal}% \pnum -Minimum positive subnormal value. +Minimum positive subnormal value, if available. \begin{footnote} Required by LIA-1. \end{footnote} +Otherwise, minimum positive normalized value. \pnum Meaningful for all floating-point types. - -\pnum -In specializations for which -\tcode{has_denorm == false}, -returns the minimum positive normalized value. \end{itemdescr} \indexlibrarymember{is_iec559}{numeric_limits}% @@ -1630,8 +1545,6 @@ static constexpr bool has_infinity = true; static constexpr bool has_quiet_NaN = true; static constexpr bool has_signaling_NaN = true; - static constexpr float_denorm_style has_denorm = denorm_absent; - static constexpr bool has_denorm_loss = false; static constexpr float infinity() noexcept { return @\textit{value}@; } static constexpr float quiet_NaN() noexcept { return @\textit{value}@; } @@ -1683,8 +1596,6 @@ static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; - static constexpr float_denorm_style has_denorm = denorm_absent; - static constexpr bool has_denorm_loss = false; static constexpr bool infinity() noexcept { return 0; } static constexpr bool quiet_NaN() noexcept { return 0; } static constexpr bool signaling_NaN() noexcept { return 0; } diff --git a/source/xrefdelta.tex b/source/xrefdelta.tex index d001fc93d8..b124de5d68 100644 --- a/source/xrefdelta.tex +++ b/source/xrefdelta.tex @@ -110,5 +110,9 @@ \movedxref{expos.only.func}{expos.only.entity} \removedxref{expos.only.types} +% P2614R2 Deprecate numeric_limits::has_denorm +\movedxref{denorm.style}{depr.numeric.limits.has.denorm} +\removedxref{fp.style} + % Deprecated features. %\deprxref{old.label} (if moved to depr.old.label, otherwise use \movedxref)