I have an mathematical theorem on the QR decomposition, which relies on the QR decomposition of an invertible square complex matrix always constructing a triangular matrix with real diagonal entries.
While at least in Octave this seems to be true, I wonder this can be relied upon in practice. I am looking for an implementation that does not produce such a triangular factor.
PS: Actually the theorem in question is the correctness of the double shifted QR iteration, as described in section 3.5 of http://people.inf.ethz.ch/arbenz/ewp/Lnotes/chapter3.pdf . The presentation seems to rely on a particular implementation of the QR algorithm.