Modified inout.cpp
Added documentation
Modified - maths.cpp
Added documentation and fixed some computational issues