Implemented svd, qr and comparison functions