Code Golf: Number to Words
The code golf series seem to be fairly popular.  I ran across some code that converts a number to its word representation.  Some examples would be (powers of 2 for programming fun):

  - 2 -> Two
  - 1024 -> One Thousand Twenty Four
  - 1048576 -> One Million Forty Eight Thousand Five Hundred Seventy Six

The algorithm my co-worker came up was almost two hundred lines long.  Seems like there would be a more concise way to do it.

Submissions in any language welcome.  Let's assume the maximum input will be 2^64, just for sanity's sake.
Code Golf: Number to Words
===

The code golf series seem to be fairly popular.  I ran across some code that converts a number to its word representation.  Some examples would be (powers of 2 for programming fun):

  - 2 -> Two
  - 1024 -> One Thousand Twenty Four
  - 1048576 -> One Million Forty Eight Thousand Five Hundred Seventy Six

The algorithm my co-worker came up was almost two hundred lines long.  Seems like there would be a more concise way to do it.

Submissions in any language welcome.  Let's assume the maximum input will be 2^64, just for sanity's sake.