fixed a compilation issue with isnan and arithmetic types