Found while fixing #1. Data/Number/Format.lua toFixedNative formats with %d (or otherwise an integer conversion) where the upstream JS toFixed keeps fractional digits. Result: fractional values are truncated to integers instead of rounded to the requested number of decimals.
Reproduce: Data.Number.Format.toStringWith (fixed 2) 3.14159 should give "3.14" but yields the integer-truncated form.
Fix: use %.<d>f so the requested decimal precision is honored; add a golden/eval covering a fractional value.
Separate from #1 (unbound number variable), which is already fixed.
Found while fixing #1.
Data/Number/Format.luatoFixedNativeformats with%d(or otherwise an integer conversion) where the upstream JStoFixedkeeps fractional digits. Result: fractional values are truncated to integers instead of rounded to the requested number of decimals.Reproduce:
Data.Number.Format.toStringWith (fixed 2) 3.14159should give "3.14" but yields the integer-truncated form.Fix: use
%.<d>fso the requested decimal precision is honored; add a golden/eval covering a fractional value.Separate from #1 (unbound
numbervariable), which is already fixed.