Skip to content

Commit

Permalink
Comment on the range of decimal exponents
Browse files Browse the repository at this point in the history
fix #110
  • Loading branch information
vinniefalco authored and ulfjack committed Apr 19, 2019
1 parent 59661c3 commit 00ecce8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ryu/d2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ static inline uint32_t decimalLength17(const uint64_t v) {
// A floating decimal representing m * 10^e.
typedef struct floating_decimal_64 {
uint64_t mantissa;
// Decimal exponent's range is -324 to 308
// inclusive, and can fit in a short if needed.
int32_t exponent;
} floating_decimal_64;

Expand Down
2 changes: 2 additions & 0 deletions ryu/f2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ static inline uint32_t mulPow5divPow2(const uint32_t m, const uint32_t i, const
// A floating decimal representing m * 10^e.
typedef struct floating_decimal_32 {
uint32_t mantissa;
// Decimal exponent's range is -45 to 38
// inclusive, and can fit in a short if needed.
int32_t exponent;
} floating_decimal_32;

Expand Down

0 comments on commit 00ecce8

Please sign in to comment.