Browse Source

Fixed float32->float64 accuracy

Unknown 7 years ago
parent
commit
5a17764318
1 changed files with 1 additions and 1 deletions
  1. 1 1
      convert.go

+ 1 - 1
convert.go

@@ -563,7 +563,7 @@ func String(i interface{}) string {
 	case uint64:
 		return strconv.FormatUint(uint64(value), 10)
 	case float32:
-		return strconv.FormatFloat(float64(value), 'f', -1, 64)
+		return strconv.FormatFloat(float64(value), 'f', -1, 32)
 	case float64:
 		return strconv.FormatFloat(value, 'f', -1, 64)
 	case bool: