It is difficult to tell without seeing the code, but this error is probably being triggered because you calculated sin(x) or x^y somewhere where the inputs were not NaN but the answer was NaN.
Thanks, Jiahao Chen Staff Research Scientist MIT Computer Science and Artificial Intelligence Laboratory
