Craig Helfgott <chelfgott at gmail.com> writes: Okay, here is my exp subroutine, can you please tell me what I am doing wrong? I'm afraid that's too much code for the time I can spend on this. You need to make a small example that exhibits the problem, or hope somebody else is willing to help. -- Torbjörn