By the time my eyes and my brain could not take anymore I decided to put this calculation script away for the day. It was syntactically correct, mathematically correct, syntactically correct (just double checking) and could run to completion in less than a second.