Function dot

Return the dot product of v and w.