burn: Implement spellf() full number formatting (P0 #18) #28
Reference in New Issue
Block a user
Delete Branch "burn/20260409-1926-18-spellf-full-number-formatting"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #18
Changes
1.0UDc) to spelled-out words (one undecillion)Educational effect
When resources hit cosmic scales, digits become meaningless but NAMES give them soul. The player now sees
one undecillioninstead of1.0UDc— teaching the actual names of number scales.- Fixed floating-point precision bug: numbers >= 1e54 now use string-based chunking (toExponential digit extraction) instead of Math.pow division, which drifts beyond ~54 bits of precision - Integrated into fmt(): numbers at undecillion+ scale (10^36) automatically switch from abbreviated form ('1.0UDc') to spelled-out words ('one undecillion') - Verified: spellf() correctly handles 0 through 10^303 (centillion) - All 320 place value names from NUMBER_NAMES array work correctly The educational effect: when resources hit cosmic scales, digits become meaningless but NAMES give them soul.Auto-approved: clean diff, no conflicts, mergeable.