About Numberoo
Numberoo began with a kindergartner's question: how big can numbers get? Leo came home from school fascinated by the googol (a one followed by one hundred zeros) and he wanted to see it. Not hear about it. See it, hear its name said out loud, and then change one digit and hear the new name.
So I built him this toy. Type digits and the page names the number in English, all the way up to one googol, and reads it aloud if you press the button. It is the smallest open-source project we maintain: a single page and a single utility module.
The number that doesn't fit in a number
A googol does not fit in a JavaScript number. Every number in JavaScript is a 64-bit float that can only represent integers exactly up to about nine quadrillion — roughly ninety digits short of the destination. Past that boundary, integers don't error; they silently round.
Numberoo's fix is to never convert your input at all. The digit string is the data structure. The engine scrubs the input to bare digits, splits it into triplets, names each triplet with the vocabulary every kid learns, and attaches scale words up a thirty-four entry table that ends at duotrigintillion (1099). There is no arithmetic anywhere in the file — so the precision bugs that haunt big numbers have nothing to attach to.
The voice is the browser's own Web Speech API: no audio files, no service, no dependency. A five-year-old types a one and then holds down the zero key, and the browser solemnly reads him four quattuorvigintillion. This is, reliably, the funniest thing either of us has heard all week.
Read more
Made by Kevin Peckham @ Lightning Jar in Philadelphia.