what is the content of those variables? perhaps it is NAN or something similar, due to memory corruption, just check it out, ok?