[P0] Implement spellf() Full Number Formatting #18
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Paperclips spellf() converts numbers to WORD form: one, two, three... up to novemnonagintillion (10^288). It uses a 320+ word lookup table (oneToTen, elevenToNineteen, multipleOfTen, placeValue). This is crucial - the numbers go so high that digits become meaningless, but NAMES give them soul.
spellf() algorithm:
The 320 place values go: thousand, million, billion... centillion, unvigintillion... novemnonagintillion.
Beacon: Implement spellf() for all major numbers. When resources hit undecillions, switch to word form. Educational: helps players grasp cosmic scale.
Ref: /tmp/paperclips/main.js lines 3560-3700 (numberCruncher), 3700-3900 (spellf), 3550-3560 (place value arrays with 320 entries)