SRC/clarnv.f(3)
π SRC/clarnv.f(3) β Library Functions Manual, but make it cute π
okay so real talk, this is the manual page for SRC/clarnv.f, straight out of the LAPACK library, and it's lowkey iconic. it's giving "tiny subroutine, big main character energy". let's get into it π
β¨ NAME β¨
SRC/clarnv.f β yes bestie, that's literally the whole name section, she's mysterious like that π¦
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine clarnv (idist, iseed, n, x)β CLARNV returns a vector of random numbers from a uniform or normal distribution. no cap, that's the whole vibe π
π« Function/Subroutine Documentation π«
subroutine clarnv (integer idist, integer, dimension( 4 ) iseed, integer n, complex, dimension( * ) x)
CLARNV returns a vector of random numbers from a uniform or normal distribution. periodt. π
π§ Purpose
!>
!> CLARNV returns a vector of n random complex numbers from a uniform or
!> normal distribution.
!>
so yeah, it hands you back n random complex numbers, either uniform or normal flavored. pick your fighter β¨
π Parameters
IDIST
!> IDIST is INTEGER
!> Specifies the distribution of the random numbers:
!> = 1: real and imaginary parts each uniform (0,1)
!> = 2: real and imaginary parts each uniform (-1,1)
!> = 3: real and imaginary parts each normal (0,1)
!> = 4: uniformly distributed on the disc abs(z) < 1
!> = 5: uniformly distributed on the circle abs(z) = 1
!>
this is the vibe selector fr fr β you tell it which distribution you want and it delivers. five whole flavors π¦
ISEED
!> ISEED is INTEGER array, dimension (4)
!> On entry, the seed of the random number generator; the array
!> elements must be between 0 and 4095, and ISEED(4) must be
!> odd.
!> On exit, the seed is updated.
!>
okay so listen π on the way in, this is the seed of the random number generator. every element has to be between 0 and 4095, and ISEED(4) must be odd β that's not a suggestion bestie, that's the rules. on the way out, the seed gets updated. glow-up, honestly π«
N
!> N is INTEGER
!> The number of random numbers to be generated.
!>
how many random numbers do you want? that's N. simple as. π
X
!> X is COMPLEX array, dimension (N)
!> The generated random numbers.
!>
and here's where the little random babies land β a COMPLEX array of dimension (N). this is the output, she's the main character π«Ά
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
the whole squad really said "we built this" and honestly? slay π
π₯ Further Details
!>
!> This routine calls the auxiliary routine SLARUV to generate random
!> real numbers from a uniform (0,1) distribution, in batches of up to
!> 128 using vectorisable code. The Box-Muller method is used to
!> transform numbers from a uniform to a normal distribution.
!>
so under the hood: this routine hits up the auxiliary routine SLARUV to make random real numbers from a uniform (0,1) distribution, in batches of up to 128, using vectorisable code (fast girl behavior β‘). then the Box-Muller method transforms those numbers from uniform into a normal distribution. math ate, no crumbs πβ¨
β Definition at line 98 of file clarnv.f.
π Author π
Generated automatically by Doxygen for LAPACK from the source code. so technically the robots wrote this one, but we understood each other π€π
okay that's the whole page bestie, you're officially caught up. LAPACK Version 3.12.0, SRC/clarnv.f(3) β mwah, go generate some random numbers responsibly π§ββοΈπ
πΈ
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms