Error in math function Resolved