a few corrections for proper handling NaNs and INFs in new C99 math functions