Exactly computes the determinant of a 3x3 matrix