mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
9ff1aa9d55
Replace separate float formatting (fmt_fp.c) and parsing (readfloat.c) implementations with a unified fp_uscale.c using 128-bit unrounded scaling. Both mrb_format_float() and mrb_read_float() now share a single pow10 table and uscale() primitive for decimal/binary conversion. This fixes subnormal parsing accuracy (old code returned 0.0 for the smallest subnormals) and corrects %.2f rounding for values like 12345.125. Table size grows from ~5KB to ~11KB in .rodata. Co-authored-by: Claude <noreply@anthropic.com>