properly assigning unsigned long values of NA_REAL and NaN