Exact dot product between two vectors