"New Random" generates a random matrix, calculates its inverse if it exists with the Gauss-Jordan algorithm and multiplies the two to verify it is correct. Because of floating point limitations it's very possible for it to fail to detect a non-invertible matrix. https://scratch.mit.edu/discuss/post/9216917/