|
759 | 759 | \indextext{\idxcode{numeric_limits}}%
|
760 | 760 | \indexlibraryglobal{numeric_limits}%
|
761 | 761 | \indexlibraryglobal{float_round_style}%
|
762 |
| -\indexlibraryglobal{float_denorm_style}% |
763 | 762 |
|
764 | 763 | \begin{codeblock}
|
765 | 764 | // all freestanding
|
766 | 765 | namespace std {
|
767 |
| - // \ref{fp.style}, floating-point type properties |
| 766 | + // \ref{round.style}, enumeration \tcode{float_round_style} |
768 | 767 | enum float_round_style;
|
769 |
| - enum float_denorm_style; |
770 | 768 |
|
771 | 769 | // \ref{numeric.limits}, class template \tcode{numeric_limits}
|
772 | 770 | template<class T> class numeric_limits;
|
|
800 | 798 | }
|
801 | 799 | \end{codeblock}
|
802 | 800 |
|
803 |
| -\rSec2[fp.style]{Floating-point type properties} |
804 |
| - |
805 |
| -\rSec3[round.style]{Type \tcode{float_round_style}} |
| 801 | +\rSec2[round.style]{Enum \tcode{float_round_style}} |
806 | 802 |
|
807 | 803 | \indexlibraryglobal{float_round_style}%
|
808 | 804 | \begin{codeblock}
|
|
843 | 839 | if the rounding style is toward negative infinity
|
844 | 840 | \end{itemize}
|
845 | 841 |
|
846 |
| -\rSec3[denorm.style]{Type \tcode{float_denorm_style}} |
847 |
| - |
848 |
| -\indexlibraryglobal{float_denorm_style}% |
849 |
| -\begin{codeblock} |
850 |
| -namespace std { |
851 |
| - enum float_denorm_style { |
852 |
| - denorm_indeterminate = -1, |
853 |
| - denorm_absent = 0, |
854 |
| - denorm_present = 1 |
855 |
| - }; |
856 |
| -} |
857 |
| -\end{codeblock} |
858 |
| - |
859 |
| -\indextext{denormalized value|see{number, subnormal}}% |
860 |
| -\indextext{value!denormalized|see{number, subnormal}}% |
861 |
| -\indextext{subnormal number|see{number, subnormal}}% |
862 |
| -\indextext{number!subnormal}% |
863 |
| -\pnum |
864 |
| -The presence or absence of subnormal numbers (variable number of exponent bits) |
865 |
| -is characterized by the values: |
866 |
| -\begin{itemize} |
867 |
| -\item |
868 |
| -\indexlibraryglobal{denorm_indeterminate}% |
869 |
| -\tcode{denorm_indeterminate} |
870 |
| -if it cannot be determined whether or not the type allows subnormal values |
871 |
| -\item |
872 |
| -\indexlibraryglobal{denorm_absent}% |
873 |
| -\tcode{denorm_absent} |
874 |
| -if the type does not allow subnormal values |
875 |
| -\item |
876 |
| -\indexlibraryglobal{denorm_present}% |
877 |
| -\tcode{denorm_present} |
878 |
| -if the type does allow subnormal values |
879 |
| -\end{itemize} |
880 |
| - |
881 | 842 | \rSec2[numeric.limits]{Class template \tcode{numeric_limits}}
|
882 | 843 |
|
883 | 844 | \rSec3[numeric.limits.general]{General}
|
|
918 | 879 | static constexpr bool has_infinity = false;
|
919 | 880 | static constexpr bool has_quiet_NaN = false;
|
920 | 881 | static constexpr bool has_signaling_NaN = false;
|
921 |
| - static constexpr float_denorm_style has_denorm = denorm_absent; |
922 |
| - static constexpr bool has_denorm_loss = false; |
923 | 882 | static constexpr T infinity() noexcept { return T(); }
|
924 | 883 | static constexpr T quiet_NaN() noexcept { return T(); }
|
925 | 884 | static constexpr T signaling_NaN() noexcept { return T(); }
|
|
1340 | 1299 | \tcode{is_iec559 != false}.
|
1341 | 1300 | \end{itemdescr}
|
1342 | 1301 |
|
1343 |
| -\indexlibrarymember{float_denorm_style}{numeric_limits}% |
1344 |
| -\begin{itemdecl} |
1345 |
| -static constexpr float_denorm_style has_denorm; |
1346 |
| -\end{itemdecl} |
1347 |
| - |
1348 |
| -\indextext{number!subnormal}% |
1349 |
| -\begin{itemdescr} |
1350 |
| -\pnum |
1351 |
| -\tcode{denorm_present} |
1352 |
| -if the type allows subnormal values |
1353 |
| -(variable number of exponent bits), |
1354 |
| -\begin{footnote} |
1355 |
| -Required by LIA-1. |
1356 |
| -\end{footnote} |
1357 |
| -\tcode{denorm_absent} |
1358 |
| -if the type does not allow subnormal values, |
1359 |
| -and |
1360 |
| -\tcode{denorm_indeterminate} |
1361 |
| -if it is indeterminate at compile time whether the type allows |
1362 |
| -subnormal values. |
1363 |
| - |
1364 |
| -\pnum |
1365 |
| -Meaningful for all floating-point types. |
1366 |
| -\end{itemdescr} |
1367 |
| - |
1368 |
| -\indexlibrarymember{has_denorm_loss}{numeric_limits}% |
1369 |
| -\begin{itemdecl} |
1370 |
| -static constexpr bool has_denorm_loss; |
1371 |
| -\end{itemdecl} |
1372 |
| - |
1373 |
| -\begin{itemdescr} |
1374 |
| -\pnum |
1375 |
| -\tcode{true} if loss of accuracy is detected as a |
1376 |
| -denormalization loss, rather than as an inexact result. |
1377 |
| -\begin{footnote} |
1378 |
| -See |
1379 |
| -ISO/IEC/IEEE 60559. |
1380 |
| -\end{footnote} |
1381 |
| -\end{itemdescr} |
1382 |
| - |
1383 | 1302 | \indexlibrarymember{infinity}{numeric_limits}%
|
1384 | 1303 | \begin{itemdecl}
|
1385 | 1304 | static constexpr T infinity() noexcept;
|
|
1445 | 1364 | \begin{itemdescr}
|
1446 | 1365 | \indextext{number!subnormal}%
|
1447 | 1366 | \pnum
|
1448 |
| -Minimum positive subnormal value. |
| 1367 | +Minimum positive subnormal value, if available. |
1449 | 1368 | \begin{footnote}
|
1450 | 1369 | Required by LIA-1.
|
1451 | 1370 | \end{footnote}
|
| 1371 | +Otherwise, minimum positive normalized value. |
1452 | 1372 |
|
1453 | 1373 | \pnum
|
1454 | 1374 | Meaningful for all floating-point types.
|
1455 |
| - |
1456 |
| -\pnum |
1457 |
| -In specializations for which |
1458 |
| -\tcode{has_denorm == false}, |
1459 |
| -returns the minimum positive normalized value. |
1460 | 1375 | \end{itemdescr}
|
1461 | 1376 |
|
1462 | 1377 | \indexlibrarymember{is_iec559}{numeric_limits}%
|
|
1630 | 1545 | static constexpr bool has_infinity = true;
|
1631 | 1546 | static constexpr bool has_quiet_NaN = true;
|
1632 | 1547 | static constexpr bool has_signaling_NaN = true;
|
1633 |
| - static constexpr float_denorm_style has_denorm = denorm_absent; |
1634 |
| - static constexpr bool has_denorm_loss = false; |
1635 | 1548 |
|
1636 | 1549 | static constexpr float infinity() noexcept { return @\textit{value}@; }
|
1637 | 1550 | static constexpr float quiet_NaN() noexcept { return @\textit{value}@; }
|
|
1683 | 1596 | static constexpr bool has_infinity = false;
|
1684 | 1597 | static constexpr bool has_quiet_NaN = false;
|
1685 | 1598 | static constexpr bool has_signaling_NaN = false;
|
1686 |
| - static constexpr float_denorm_style has_denorm = denorm_absent; |
1687 |
| - static constexpr bool has_denorm_loss = false; |
1688 | 1599 | static constexpr bool infinity() noexcept { return 0; }
|
1689 | 1600 | static constexpr bool quiet_NaN() noexcept { return 0; }
|
1690 | 1601 | static constexpr bool signaling_NaN() noexcept { return 0; }
|
|
0 commit comments