fix arithmetic functions for all numeric datatypes
apply proper validation to datatype conversion of numeric types