added qr, matrix multiplication and approximate equality testing functions