added relError(computes relative error among two vectors), and mod(double x) function