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 discabs(z) < 1= 5:uniformly distributed on the circleabs(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 between0and4095, andISEED(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
- 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