We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12bab72 commit 60be1cfCopy full SHA for 60be1cf
1 file changed
py/objfloat.c
@@ -24,6 +24,10 @@ STATIC void float_print(void (*print)(void *env, const char *fmt, ...), void *en
24
char buf[32];
25
format_float(o->value, buf, sizeof(buf), 'g', 6, '\0');
26
print(env, "%s", buf);
27
+ if (strchr(buf, '.') == NULL) {
28
+ // Python floats always have decimal point
29
+ print(env, ".0");
30
+ }
31
#else
32
33
sprintf(buf, "%.8g", (double) o->value);
0 commit comments