home : english counter

 

overview

English Counter counts in English (surprising, huh?). It starts with "one" and is limited only by the capacity of a 64-bit integer. For a fairly significant performance penality, I could have made it work with BigMath and made its only limit the numbers for which there are names. Alas, I'm not that bored. Also, the initial inspiration for the project was a challenge from a Flash/ActionScript developer to (1) help him with an interview question, (2) implement it in fewer lines of code than his ActionScript version, and (3) best his implementations efficiency. There are a handful of good optimizations left to be made, but I only had to beat ActionScript, so, it wasn't really worth the effort.

download

EnglishCounterInC-20090422-1.zip, main.c, main2.c

The two .c files differ in their manner of optimization. The .zip file contains the entire Xcode project.

© Curtis Jones, 2009 All Rights Reserved