Skip to content

Commit fc28255

Browse files
committed
Document the typedefs
1 parent e688740 commit fc28255

File tree

6 files changed

+32
-2
lines changed

6 files changed

+32
-2
lines changed

doc/decimal/decimal128.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ namespace decimal {
3030
3131
class decimal128 {
3232
33+
public:
34+
using significand_type = detail::uint128;
35+
using exponent_type = std::uint32_t;
36+
using biased_exponent_type = std::int32_t;
37+
3338
// Paragraph numbers are from ISO/IEC DTR 24733
3439
3540
// 3.2.4.1 construct/copy/destroy

doc/decimal/decimal128_fast.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ namespace decimal {
3030
3131
class decimal128_fast {
3232
33+
public:
34+
using significand_type = detail::uint128;
35+
using exponent_type = std::uint32_t;
36+
using biased_exponent_type = std::int32_t;
37+
3338
// Paragraph numbers are from ISO/IEC DTR 24733
3439
3540
// 3.2.4.1 construct/copy/destroy

doc/decimal/decimal32.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ namespace decimal {
3030
3131
class decimal32 {
3232
33+
public:
34+
using significand_type = std::uint32_t;
35+
using exponent_type = std::uint32_t;
36+
using biased_exponent_type = std::int32_t;
37+
3338
// Paragraph numbers are from ISO/IEC DTR 24733
3439
3540
// 3.2.2.1 construct/copy/destroy

doc/decimal/decimal32_fast.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ https://www.boost.org/LICENSE_1_0.txt
1414
The performance changes by being non-IEEE 754 compliant so that the value does not have to be decoded from bits, but is instead directly represented internal to the type.
1515
As is often the case this trades space for time by having greater storage width requirements.
1616

17-
- Storage width - At least 48bits (`std::uint_fast32_t` + `std::uint_fast8_t` + `bool`)
17+
- Storage width - 48bits (`std::uint32_t` + `std::uint8_t` + `bool`)
1818
- Precision - 7 decimal digits (not bits like binary)
1919
- Max exponent - 96
2020
- Max Value - 9.999999e96
@@ -30,6 +30,11 @@ namespace decimal {
3030
3131
class decimal32_fast {
3232
33+
public:
34+
using significand_type = std::uint32_t;
35+
using exponent_type = std::uint8_t;
36+
using biased_exponent_type = std::int32_t;
37+
3338
// Paragraph numbers are from ISO/IEC DTR 24733
3439
3540
// 3.2.2.1 construct/copy/destroy

doc/decimal/decimal64.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ namespace decimal {
3030
3131
class decimal64 {
3232
33+
public:
34+
using significand_type = std::uint64_t;
35+
using exponent_type = std::uint32_t;
36+
using biased_exponent_type = std::int32_t;
37+
3338
// Paragraph numbers are from ISO/IEC DTR 24733
3439
3540
// 3.2.3.1 construct/copy/destroy

doc/decimal/decimal64_fast.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ https://www.boost.org/LICENSE_1_0.txt
1414
The performance changes by being non-IEEE 754 compliant so that the value does not have to be decoded from bits, but is instead directly represented internal to the type.
1515
As is often the case this trades space for time by having greater storage width requirements.
1616

17-
- Storage width - At least 88 bits (`std::uint_fast64_t` + `std::uint_fast_16_t` + `bool`)
17+
- Storage width - 88 bits (`std::uint64_t` + `std::uint16_t` + `bool`)
1818
- Precision - 16 decimal digits (not bits like binary)
1919
- Max exponent - 385
2020
- Max Value - 9.999999999999999e385
@@ -30,6 +30,11 @@ namespace decimal {
3030
3131
class decimal64_fast {
3232
33+
public:
34+
using significand_type = std::uint64_t;
35+
using exponent_type = std::uint16_t;
36+
using biased_exponent_type = std::int32_t;
37+
3338
// Paragraph numbers are from ISO/IEC DTR 24733
3439
3540
// 3.2.3.1 construct/copy/destroy

0 commit comments

Comments
 (0)