Replace subtraction of large values in test with direct comparison The original assert subtracts two almost-equat numbers, which may be (as shown in your example) quite large. Specifically, there are values with 15-16 digits. This is on the edge of accuracy for doubles, and tiny deviations in the calculation may lead to a change in the lowest digit, which is in the order of one. IMO this is the reason here. This is replaced by a direct check whether the matric is antisymmetric.