ZLAHILB(3)

πŸ“¦
version 3.12.1 Β· 2 versions
, in arch rolling

Hi bestie πŸ’– welcome to the Library Functions Manual for TESTING/MATGEN/zlahilb.f. This is the ZLAHILB page, and we're gonna go through it like a group chat that actually knows Fortran. No cap. 🫢

πŸ’– NAME πŸ’–

TESTING/MATGEN/zlahilb.f

That's the file, periodt. It's the home of ZLAHILB in the LAPACK testing/matgen corner of the universe. 🌈

✨ SYNOPSIS ✨

🧚 Functions/Subroutines 🧚

subroutine zlahilb (n, nrhs, a, lda, x, ldx, b, ldb, work, info, path)
    ZLAHILB

πŸŽ€ Function/Subroutine Documentation πŸŽ€

πŸ’… subroutine zlahilb πŸ’…

   subroutine zlahilb (integer n, integer nrhs, complex*16, dimension(lda,n) a,
       integer lda, complex*16, dimension(ldx, nrhs) x, integer ldx,
       complex*16, dimension(ldb, nrhs) b, integer ldb, double precision,
       dimension(n) work, integer info, character*3 path)
       ZLAHILB

Okay so this is the full signature, and yes it's giving big Fortran energy but we love her. The function name is ZLAHILB. πŸ’œ

πŸ¦‹ Purpose πŸ¦‹

ZLAHILB generates an N by N scaled Hilbert matrix in A, along with NRHS right-hand sides in B and solutions in X such that A*X=B. Iconic. ✨

The Hilbert matrix is scaled by M = LCM(1, 2, ..., 2*N-1) so that all entries are integers. The right-hand sides are the first NRHS columns of M * the identity matrix, and the solutions are the first NRHS columns of the inverse Hilbert matrix. Math but make it integer-coded. Slay. πŸ’…

The condition number of the Hilbert matrix grows exponentially with its size, roughly as O(e ** (3.5*N)). Additionally, the inverse Hilbert matrices beyond a relatively small dimension cannot be generated exactly without extra precision. Precision is exhausted when the largest entry in the inverse Hilbert matrix is greater than 2 to the power of the number of bits in the fraction of the data type used plus one, which is 24 for single precision. So yeah, she can run out of precision β€” not a vibe. 😭

In single, the generated solution is exact for N <= 6 and has small componentwise error for 7 <= N <= 11. Good to know, bestie. πŸ“

πŸ’… Parameters πŸ’…

  • N β€” N is INTEGER; the dimension of the matrix A.
  • NRHS β€” NRHS is INTEGER; the requested number of right-hand sides.
  • A β€” A is COMPLEX array, dimension (LDA, N); the generated scaled Hilbert matrix.
  • LDA β€” LDA is INTEGER; the leading dimension of the array A. LDA >= N.
  • X β€” X is COMPLEX array, dimension (LDX, NRHS); the generated exact solutions. Currently, the first NRHS columns of the inverse Hilbert matrix.
  • LDX β€” LDX is INTEGER; the leading dimension of the array X. LDX >= N.
  • B β€” B is REAL array, dimension (LDB, NRHS); the generated right-hand sides. Currently, the first NRHS columns of LCM(1, 2, ..., 2*N-1) * the identity matrix. (Yep, the parameter docs say REAL right there β€” keeping it exactly as written. πŸ™ˆ)
  • LDB β€” LDB is INTEGER; the leading dimension of the array B. LDB >= N.
  • WORK β€” WORK is REAL array, dimension (N).
  • INFO β€” INFO is INTEGER.
    • = 0: successful exit
    • = 1: N is too large; the data is still generated but may not be not exact.
    • < 0: if INFO = -i, the i-th argument had an illegal value
  • PATH β€” PATH is CHARACTER*3; the LAPACK path name.

πŸ‘‘ Author πŸ‘‘

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

Definition at line 132 of file zlahilb.f.

🌈 Author 🌈

Generated automatically by Doxygen for LAPACK from the source code.


And that's the whole page, bestie β€” every parameter, every condition-number caveat, every little INFO code. This cutie signs off from TESTING/MATGEN/zlahilb.f(3) with LAPACK Version 3.12.0. Stay exact, stay iconic, and may your matrices always be scaled. πŸ’…βœ¨πŸ‘‘

πŸ“¦ where this page comes from