From ad6cc04ba96f90cf045fab5530660a4765c367af Mon Sep 17 00:00:00 2001 From: Ulf Adams Date: Wed, 15 Jan 2020 10:18:39 +0100 Subject: [PATCH] Fix comment to say the correct rounding direction --- ryu/s2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/s2d.c b/ryu/s2d.c index 483dd309..5ca4a6fe 100644 --- a/ryu/s2d.c +++ b/ryu/s2d.c @@ -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;