The error is due to call to "Sqr", this function expects a positive value, in your case ((0.5 * Isprkt) ^ 2 - (InA - 1.25) ^ 2) might be evaluating to a negative value, modify the code something like this,
dim i as integer
if ((0.5 * Isprkt) ^ 2 - (InA - 1.25) ^ 2) < 0 then
i = -1
IPS = (0.3125) + (0.5 * Isprkt) + i * Sqr(Abs((0.5 * Isprkt) ^ 2 - (InA - 1.25) ^ 2)) + 2
Thanks that solved the mystery of the argument error. The part that concerns me now is that I have a negative value somewhere but I can retrace and hopefully correct. Thanks again.