|
|
@@ -46,8 +46,9 @@
|
|
|
#define FLOATTYPE_REPR(v, str) do { \
|
|
|
float v_copy = (v); \
|
|
|
char *into_str = (str); \
|
|
|
- if ((float)(int)v_copy == v_copy) { \
|
|
|
- snprintf(into_str, 32, "%d", (int)v_copy); \
|
|
|
+ if (v_copy < 1e16f && v_copy > -1e16f && \
|
|
|
+ (float)(long long)v_copy == v_copy) { \
|
|
|
+ snprintf(into_str, 32, "%lld", (long long)v_copy); \
|
|
|
} else { \
|
|
|
pftoa(v_copy, into_str); \
|
|
|
} \
|