Add isnan function and deprecated macros