In the ??gaussred help, it is said that the result will be
upper-triangular but this is not true. I suppose this happens when the
given matrix is not (positive) definite.
The formula which is written in ??gaussred is correct though, if one
replaces j>i by j!=i. So I think the docs needs to clarified.