SRC/zlarnv.f(3)

πŸ¦‹ SRC/zlarnv.f πŸ¦‹

okay bestie, this is a page from the LAPACK manual β€” Library Functions Manual vibes β€” and honestly? it's giving random number generator realness ✨


✨ NAME ✨

SRC/zlarnv.f β€” no cap, that's the whole name πŸ’…


✨ SYNOPSIS ✨

🌸 Functions/Subroutines

  • subroutine zlarnv (idist, iseed, n, x) β€” ZLARNV returns a vector of random numbers from a uniform or normal distribution. iconic behaviour, truly πŸŽ€

✨ Function/Subroutine Documentation ✨

subroutine zlarnv (integer idist, integer, dimension( 4 ) iseed, integer n,
    complex*16, dimension( * ) x)

ZLARNV returns a vector of random numbers from a uniform or normal distribution. yeah. that's the whole gig 🫢

πŸ’œ Purpose:

!>
!> ZLARNV returns a vector of n random complex numbers from a uniform or
!> normal distribution.
!>

literally what it says on the tin bestie β€” n random complex numbers, uniform or normal, your pick 🌈

🌸 Parameters

  • IDIST β€” IDIST is INTEGER. tells the routine which distribution to pull from, and there are five flavours, so pay attention πŸ‘€:
    • = 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

like, five whole aesthetics. choose wisely πŸ’…

  • ISEED β€” ISEED is INTEGER array, dimension (4). On entry, this is the seed of the random number generator β€” and heads up, the array elements must be between 0 and 4095, and ISEED(4) must be odd. that last bit is not a suggestion bestie, it's a whole requirement 😭 On exit, the seed is updated (she evolves, she grows 🌱).
  • N β€” N is INTEGER. The number of random numbers to be generated. the count. the amount. the quantity you asked for πŸ”₯
  • X β€” X is COMPLEX*16 array, dimension (N). The generated random numbers. this is where the magic lands, freshly baked πŸ“

πŸ‘‘ Author

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

the whole squad really showed up for this one 🫢

🧚 Further Details:

!>
!>  This routine calls the auxiliary routine DLARUV 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 yeah β€” she's outsourcing the real work to her bestie DLARUV, pulling uniform (0,1) reals in batches of up to 128 with vectorisable code (speed, she ate πŸ’€βœ¨), and then the Box-Muller method swoops in to turn uniform into normal. the way that transformation works?? obsessed 😭

Definition at line 98 of file zlarnv.f. πŸ“


✨ Author ✨

Generated automatically by Doxygen for LAPACK from the source code. the robots did this one, not me πŸ€–πŸ’–


and that's the whole page bestie, no notes πŸ’…

LAPACK β€” Version 3.12.0 🌸 mwah, go generate some random numbers, ily πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from