define 'NAN' in fitcurves.cpp