GSL-RANDIST(1)
okay so this is GSL-RANDIST(1) from the General Commands Manual β pull up a chair, bestie, we're learning a tiny GSL demo π«Άβ¨
π NAME π
gsl-randist β generate random samples from various distributions. That's the whole vibe: random samples, various distributions, iconic behavior π
β¨ SYNOPSYS β¨
the page spells this section SYNOPSYS β not me, bestie π β and the shape is:
gsl-randist seed n DIST param1 param2 [..]
so you're giving it seed, n, DIST, then param1, param2, [..] β the parameters for whichever distribution you picked π
π¦ DESCRIPTION π¦
gsl-randist is a demonstration program for the GNU Scientific Library β like a little show-and-tell for GSL π§π. It generates n random samples from the distribution DIST using the distribution parameters param1, param2, ... .
πΈ EXAMPLE πΈ
Here's the example, and it's lowkey adorable because it pipes randist into the histogram tool and then plots it. We generate 10000 random samples from a Cauchy distribution with a width of 30 and histogram them over the range -100 to 100, using 200 bins π₯
gsl-randist 0 10000 cauchy 30 | gsl-histogram -100 100 200 > histogram.dat
A plot of the resulting histogram will show the familiar shape of the Cauchy distribution with fluctuations caused by the finite sample size π¦
and to make the plot, the page gives this exact command:
awk '{print $1, $3 ; print $2, $3}' histogram.dat | graph -T X
π₯ SEE ALSO π₯
go check these out, iykyk π
π AUTHOR π
gsl-randist was written by James Theiler and Brian Gough. Copyright 1996-2000; for copying conditions see the GNU General Public Licence.
This manual page was added by the Dirk Eddelbuettel <edd@debian.org>, the Debian GNU/Linux maintainer for GSL.
source/version: GNU; page: GSL-RANDIST(1); date: no date shown on this page β that's the footer tea, bestie π«Άπ
π¦ where this page comes from
- alpine 3.24: gsl-doc 2.8-r0 Β· GPL-3.0-or-later
- arch rolling: gsl 2.8-1 Β· GPL-3.0-only
- centos-stream 9: gsl 2.6-7.el9 Β· GPLv3+
- centos-stream 9: gsl 2.6-7.el9 Β· GPLv3+
- epel 10: gsl 2.7.1-13.el10_2 Β· GPL-3.0-or-later
- fedora 43: gsl 2.8-2.fc43 Β· GPL-3.0-or-later
- fedora 43: gsl 2.8-2.fc43 Β· GPL-3.0-or-later
- fedora 44: gsl 2.8-3.fc44 Β· GPL-3.0-or-later
- fedora 44: gsl 2.8-3.fc44 Β· GPL-3.0-or-later
- nixos 26.05: gsl 2.8
- nixpkgs unstable: gsl 2.8
- opensuse-leap 16.0: gsl 2.8-160000.2.2 Β· GPL-3.0-or-later
- opensuse-leap 16.0: gsl 2.8-160000.2.2 Β· GPL-3.0-or-later
- opensuse-leap 16.0: gsl 2.8-160000.2.2 Β· GPL-3.0-or-later
- opensuse-leap 16.0: gsl 2.8-160000.2.2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms