Handle formatting floats on 32-bit systems
Closes #46
diff --git a/number.go b/number.go
index 3214134..dec6186 100644
--- a/number.go
+++ b/number.go
@@ -160,7 +160,7 @@
intf, fracf := math.Modf(n + renderFloatPrecisionRounders[precision])
// generate integer part string
- intStr := strconv.Itoa(int(intf))
+ intStr := strconv.FormatInt(int64(intf), 10)
// add thousand separator if required
if len(thousandStr) > 0 {
diff --git a/number_test.go b/number_test.go
index dd38a5b..516f337 100644
--- a/number_test.go
+++ b/number_test.go
@@ -25,6 +25,7 @@
{"#,###.###", "#,###.###", 12345.6789, "12,345.679"},
{"#,###.####", "#,###.####", 12345.6789, "12,345.6789"},
{"#.###,######", "#.###,######", 12345.6789, "12.345,678900"},
+ {"bug46", "#,###.##", 52746220055.92342, "52,746,220,055.92"},
{"#\u202f###,##", "#\u202f###,##", 12345.6789, "12 345,68"},
// special cases