/home/abui...N/slarnd.f(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’… SLARND β€” the random-number glow-up (Library Functions Manual, bestie)

okay so real talk: you wandered into /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/MATGEN/slarnd.f and you're like "what is this file and why is the path a whole novel" 😭 β€” don't worry, we're gonna break it down together. This is a Library Functions Manual page and it's genuinely so much simpler than that path makes it look.


✨ SYNOPSIS ✨

Functions/Subroutines

  • real function SLARND (idist, iseed) β€” that's her, that's the whole function, she's called SLARND πŸŽ€

🌸 Function/Subroutine Documentation 🌸

real function SLARND (integer idist, integer, dimension( 4 ) iseed)

SLARND β€” literally the name. iconic. no notes. πŸ’–

πŸ¦‹ Purpose:

!>
!> SLARND returns a random real number from a uniform or normal
!> distribution.
!>

so yeah β€” you call her, she hands you back a random real number, and depending on the vibe you picked it's either uniform or normal. that's the whole job. she ate and left no crumbs πŸ‘‘

πŸŽ€ Parameters

  • IDIST β€” IDIST is INTEGER β€” this is the vibe selector, the "which distribution are we feeling today" dial. the options are:
!>          IDIST is INTEGER
!>          Specifies the distribution of the random numbers:
!>          = 1:  uniform (0,1)
!>          = 2:  uniform (-1,1)
!>          = 3:  normal (0,1)
!>

so like: = 1 gives you uniform (0,1), = 2 gives you uniform (-1,1), and = 3 gives you normal (0,1). pick your fighter πŸ’…

  • ISEED β€” ISEED is INTEGER array, dimension (4) β€” the seed of the random number generator, and bestie there are rules:
!>          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.
!>

on entry: every array element has to be between 0 and 4095, and ISEED(4) must be odd β€” like, that's not a suggestion, that's the rule, do not come in here with an even ISEED(4) πŸ™ˆ on exit: the seed gets updated (she moves on with her life so your next call isn't the same number, periodt).

πŸ‘‘ Author

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

(that's a whole squad, a coalition, the avengers of numerics 🫢)

πŸ”₯ Further Details:

!>
!>  This routine calls the auxiliary routine SLARAN to generate a random
!>  real number from a uniform (0,1) distribution. The Box-Muller method
!>  is used to transform numbers from a uniform to a normal distribution.
!>

so the tea is: SLARND calls the auxiliary routine SLARAN to get a random real number from a uniform (0,1) distribution, and then the Box-Muller method transforms uniform numbers into a normal distribution. math girlie behavior fr fr πŸ’€βœ¨

ngl the "Further Details" section is where the real plot is β€” SLARAN does the uniform heavy lifting, Box-Muller does the glow-up to normal.

πŸ“ Definition at line 72 of file slarnd.f.

like, literally line 72. of slarnd.f. now you know exactly where to find her 🧚


⭐ Author (the meta one) ⭐

Generated automatically by Doxygen for LAPACK from the source code. (so nobody hand-wrote this page, the robots did it, and honestly? slay πŸ€–πŸ’œ)


and that's the whole page bestie β€” you understood it, no cap. 🌈

LAPACK β€” Version 3.12.0 β€” /home/abui...N/slarnd.f(3) πŸ“

thanks for reading, mwah, see you in the next manpage πŸ’‹πŸŽ€

πŸ“¦ where this page comes from