Update maths.cpp

Add subtract functions and implement minor changes.