[Cfp-interest 2446] Re: C++ and subnormals

David Olsen dolsen at nvidia.com
Wed Jun 22 13:53:47 PDT 2022


You can always find the latest C++ working draft at http://eel.is/c++draft/  (If you want a PDF instead, go to https://www.open-std.org/jtc1/sc22/wg21/ and search through "individual papers" of recent mailings for "Working Draft, Standard for Programming Language C++".)

The wording for "has_denorm" and "denorm_min()" hasn't changed in the latest draft from what you quoted below.


-----Original Message-----
From: Cfp-interest <cfp-interest-bounces at oakapple.net> On Behalf Of Fred J. Tydeman
Sent: Wednesday, June 22, 2022 12:24 PM
To: cfp-interest <cfp-interest at ucbtest.org>
Subject: [Cfp-interest 2445] C++ and subnormals

External email: Use caution opening links or attachments


This is the latest draft C++ standard I have.

DRAFT INTERNATIONAL STANDARD
ISO/IEC DIS 14882
Voting begins on: 2020-06-11
Programming languages - C++


17.3 Implementation properties [support.limits]
17.3.1 General  [support.limits.general]
1 The headers <limits> (17.3.3), <climits> (17.3.6), and <cfloat>
(17.3.7) supply characteristics of imple-mentation-dependent
arithmetic types (6.8.1).


17.3.4 Floating-point type properties
17.3.4.2 Type float_denorm_style [denorm.style]
namespace std {
 enum float_denorm_style {
  denorm_indeterminate = -1,
  denorm_absent = 0,
  denorm_present = 1
  };
}
1 The presence or absence of subnormal numbers (variable number of
exponent bits) is characterized by the values:
(1.1) - denorm_indeterminate if it cannot be determined whether or not the type allows subnormal values
(1.2) - denorm_absent if the type does not allow subnormal values
(1.3) - denorm_present if the type does allow subnormal values


17.3.5.1 numeric_limits members [numeric.limits.members]
static constexpr float_denorm_style has_denorm;

45 denorm_present if the type allows subnormal values (variable number
   of exponent bits)199 ,
   denorm_absent if the type does not allow subnormal values,
   and denorm_indeterminate if it is indeterminate
    at compile time whether the type allows subnormal values.
46 Meaningful for all floating-point types.

static constexpr T denorm_min() noexcept;
54 Minimum positive subnormal value.204
55 Meaningful for all floating-point types.
56 In specializations for which has_denorm == false, returns the minimum positive normalized value.

204)Required by LIA-1.



---
Fred J. Tydeman        Tydeman Consulting
tydeman at tybor.com      Testing, numerics, programming
+1 (702) 608-6093      Vice-chair of PL22.11 (ANSI "C")





More information about the Cfp-interest mailing list