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