shufrans man page on SunOS

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
SunOS logo
[printable version]

shufrans(3M)							  shufrans(3M)

NAME
       shufrans - random number shufflers

SYNOPSIS
       cc [ flag ... ] file ...	 -lsunmath -lm [ library ... ]

       #include <sunmath.h>

       void i_shufrans_(int *x, int *n, int *l, int *u);

       void u_shufrans_(unsigned *x, int *n, unsigned *l, unsigned *u);

       void r_shufrans_(float *x, int *n, float *l, float *u);

       void d_shufrans_(double *x, int *n, double *l, double *u);

DESCRIPTION
       These functions shuffle the random numbers x[0], ..., x[*n-1] in place.
       The numbers may have been generated by any method but are assumed to be
       uniformly  distributed  over the interval [*l,*u].  (If any number lies
       outside this interval, the results are undefined.)

       These routines use the method called "Algorithm B" by Knuth.  They  use
       an internal table of between 4 and 256 elements depending on *n.

EXAMPLES
       To shuffle 1000 double precision random numbers in [lb, ub]:

	      double x[1000], lb, ub;
	      int n = 1000;

	      d_shufrans_(x, &n, &lb, &ub);

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌────────────────────┬─────────────────┐
       │  ATTRIBUTE TYPE    │ ATTRIBUTE VALUE │
       ├────────────────────┼─────────────────┤
       │Interface Stability │ Committed	      │
       │MT-Level	    │ MT-Safe	      │
       └────────────────────┴─────────────────┘
SEE ALSO
       addrans(3M),   drand48(3C),  lcrans(3M),	 mwcrans(3M),  rand(3C),  ran‐
       dom(3C), attributes(5)

       Knuth, Seminumerical Algorithms, 1981, Addison-Wesley.

       Park and Miller, Random Number Generators: Good Ones are Hard to	 Find,
       Communications of the ACM, October 1988.

				  14 Mar 2009			  shufrans(3M)
[top]

List of man pages available for SunOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net