mtl5.qr#
- mtl5.qr(A)#
Householder QR of a tall-or-square matrix (num_rows >= num_cols).
Accepts float32/float64 (and complex), plus every Universal dtype via
mtl5.convert(). Returns a factorization exposing.solve(b)(least squares),.Qand.R.From 16 bits up the Universal types factorize usefully;
fixpnt16is coarse (residual about 1.5e-2 on an 8x8 in-range matrix) but honest. The 8-bit formats are not usable:posit8,fp8andfixpnt8give residuals of 0.04 to 0.11. Read the result before trusting a narrow format.Before MTL5 5.22.0,
fp8,fixpnt8andfixpnt16failed silently: every reflector fell back to the identity, so.Qcame back as the exact identity and.Ras the upper triangle of A, which scores a perfect orthogonality check. MTL5 5.22.0’s reflector takes LAPACKdlarfg’s sign, which these formats can hold, so they now get real, if coarse, factors.