Browse Source

Fixed operator precedence.

Dmitry Panov 7 years ago
parent
commit
ef8c030e3c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dtoa.go

+ 1 - 1
dtoa.go

@@ -219,7 +219,7 @@ func dtobasestr(num float64, radix int) string {
 		}
 		}
 		mlo := big.NewInt(1)
 		mlo := big.NewInt(1)
 		mhi := mlo
 		mhi := mlo
-		if (word1 == 0) && ((word0 & bndry_mask) == 0) && ((word0 & (exp_mask & exp_mask << 1)) != 0) {
+		if (word1 == 0) && ((word0 & bndry_mask) == 0) && ((word0 & (exp_mask & (exp_mask << 1))) != 0) {
 			/* The special case.  Here we want to be within a quarter of the last input
 			/* The special case.  Here we want to be within a quarter of the last input
 			   significant digit instead of one half of it when the output string's value is less than d.  */
 			   significant digit instead of one half of it when the output string's value is less than d.  */
 			s2 += log2P
 			s2 += log2P