Add Error Handler to AM and SN

Add Error Handler to Arithmetic Mean and Smallest Number
Small Correct of AM and SN