QR and least squares for arbitrary floating-point multiprecision