I want to do something in the spirit of this code: ...
I have defined the following function: ...
I always have difficulty in writing a non-trivial compiled function. I'm using Mathematica 9. Please see the following code ...