fix the floating point problem, handle case where input is not array, but not handle case where input contains non-number type