Skip to content

Commit

Permalink
Fix comment to say the correct rounding direction
Browse files Browse the repository at this point in the history
  • Loading branch information
ulfjack authored Jan 15, 2020
1 parent 447d699 commit ad6cc04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ryu/s2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ enum Status s2d_n(const char * buffer, const int len, double * result) {
return SUCCESS;
}
if (m10digits + e10 >= 310) {
// Number is larger than 1e+309, which should be rounded down to 0; return +/-Infinity.
// Number is larger than 1e+309, which should be rounded to +/-Infinity.
uint64_t ieee = (((uint64_t) signedM) << (DOUBLE_EXPONENT_BITS + DOUBLE_MANTISSA_BITS)) | (0x7ffull << DOUBLE_MANTISSA_BITS);
*result = int64Bits2Double(ieee);
return SUCCESS;
Expand Down

0 comments on commit ad6cc04

Please sign in to comment.