Is About A Million


You are to write a _boolean_ function that keeps track of how many times it (itself) has been called. Specifically, if it has been called _about_ a million times (or more), then it is _extremely_ likely that it will return true. If it has not, then it is not as likely. You have only 16 bits of storage space; the function takes no arguments,  you can declare as many constants as you want, but you cannot create or access any global memory, other than the 16 bits. How do you write such a function?


Home

Answer