فهرست منبع

Fixed float32->float64 accuracy

Unknown 8 سال پیش
والد
کامیت
5a17764318
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      convert.go

+ 1 - 1
convert.go

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