py: Add MICROPY_FLOAT_CONST macro for defining float constants.
All float constants in the core should use this macro to prevent
unnecessary creation of double-precision floats, which makes code less
efficient.
diff --git a/py/parsenum.c b/py/parsenum.c
index 1010ad3..b1c449c 100644
--- a/py/parsenum.c
+++ b/py/parsenum.c
@@ -227,7 +227,7 @@
} else {
if (in == PARSE_DEC_IN_FRAC) {
dec_val += dig * frac_mult;
- frac_mult *= 0.1;
+ frac_mult *= MICROPY_FLOAT_CONST(0.1);
} else {
dec_val = 10 * dec_val + dig;
}