1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2
3<!--Converted with LaTeX2HTML 2018.3 (Released July 19, 2018) -->
4<HTML lang="EN">
5<HEAD>
6<TITLE>rand_uni</TITLE>
7<META NAME="description" CONTENT="rand_uni">
8<META NAME="keywords" CONTENT="subroutines">
9<META NAME="resource-type" CONTENT="document">
10<META NAME="distribution" CONTENT="global">
11
12<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
13<META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0">
14<META NAME="Generator" CONTENT="LaTeX2HTML v2018.3">
15   <link rel='apple-touch-icon' sizes='180x180' href='images/favicons/apple-touch-icon.png?v=2017'>
16   <link rel='icon' type='image/png' sizes='32x32' href='images/favicons/favicon-32x32.png?v=2017'>
17   <link rel='icon' type='image/png' sizes='16x16' href='images/favicons/favicon-16x16.png?v=2017'>
18   <link rel='manifest' href='images/favicons/manifest.json?v=2017'>
19   <link rel='mask-icon' href='images/favicons/safari-pinned-tab.svg?v=2017' color='#5bbad5'>
20   <link rel='shortcut icon' href='images/favicons/favicon.ico?v=2017'>
21   <meta name='apple-mobile-web-app-title' content='HEALPix'>
22   <meta name='application-name' content='HEALPix'>
23   <meta name='msapplication-config' content='images/favicons/browserconfig.xml?v=2017'>
24   <meta name='theme-color' content='#ffffff'>
25
26<LINK REL="STYLESHEET" HREF="subroutines.css">
27
28<LINK REL="next" HREF="sub_read_asctab.htm">
29<LINK REL="previous" HREF="sub_rand_init.htm">
30<LINK REL="next" HREF="sub_read_asctab.htm">
31</HEAD>
32
33<body text="#000000" bgcolor="#FFFFFA">
34
35<DIV CLASS="navigation"><!--Navigation Panel-->
36<A
37 HREF="sub_rand_init.htm">
38<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
39<A
40 HREF="sub_HEALPix_F90_subroutines.htm">
41<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
42<A
43 HREF="sub_read_asctab.htm">
44<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
45<A ID="tex2html460"
46  HREF="sub_TABLE_CONTENTS.htm">
47<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A>
48<BR>
49<B> Previous:</B> <A
50 HREF="sub_rand_init.htm">rand_init</A>
51
52<B>Up:</B> <A
53 HREF="sub_HEALPix_F90_subroutines.htm">HEALPix/F90 subroutines</A>
54
55<B> Next:</B> <A
56 HREF="sub_read_asctab.htm">read_asctab*</A>
57<B> Top:</B> <a href="main.htm">Main Page</a></DIV>
58<!--End of Navigation Panel-->
59
60<H1><A ID="SECTION8400"></A>
61<A ID="sub:rand_uni"></A>
62<BR>
63
64</H1>
65
66<P>
67<b><font size=+6><FONT COLOR="#CC0000">rand_uni</FONT></font></b><hr>
68<H3>This routine returns a number out of a pseudo-random uniform deviate (ie, its
69  probability distribution is uniform in the range ]0,1[).
70</H3>
71Location in HEALPix directory tree: <a href="https://sourceforge.net/p/healpix/code/1005/tree/trunk/src/f90/mod/rngmod.f90"><b>src/f90/mod/rngmod.f90</b></a>&nbsp;
72
73<P>
74<hr><h1>FORMAT </h1><h3>var=<FONT COLOR="#CC0000">rand_uni</FONT>(
75<A HREF="#sub:rand_uni:rng_handle">rng_handle</A>
76)</h3>
77
78<P>
79<hr><H1>ARGUMENTS</H1>
80
81<TABLE CELLPADDING=3 BORDER="1">
82<TR><TH ALIGN="LEFT" VALIGN="TOP" WIDTH=150><SPAN  CLASS="textbf">name&nbsp;&amp;&nbsp;dimensionality</SPAN></TH>
83<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=75><SPAN  CLASS="textbf">kind</SPAN></TH>
84<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=50><SPAN  CLASS="textbf">in/out</SPAN></TH>
85<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=175><SPAN  CLASS="textbf">description</SPAN></TH>
86</TR>
87<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=150>&nbsp;</TD>
88<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=75>&nbsp;</TD>
89<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=50>&nbsp;</TD>
90<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=175>&nbsp;</TD>
91</TR>
92<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=150>
93rng_handle<A ID="sub:rand_uni:rng_handle"></A></TD>
94<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=75>planck_rng</TD>
95<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=50>INOUT</TD>
96<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=175>structure of type <TT>planck_rng</TT>
97                   containing on all information necessary to continue same
98                   random sequence.</TD>
99</TR>
100<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=150>var</TD>
101<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=75>DP</TD>
102<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=50>OUT</TD>
103<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=175>number belonging to a pseudo-random uniform deviate.</TD>
104</TR>
105</TABLE>
106
107<P>
108<HR><H1>EXAMPLE:</H1>
109<tt>use healpix_types
110<BR>
111use rngmod
112<BR>
113type(planck_rng) :: rng_handle
114<BR>
115real(dp) :: uni
116<BR>
117<BR>
118call rand_init(rng_handle, 12345, 6789012)
119<BR>
120uni = rand_uni(rng_handle)</tt>
121<blockquote>
122initiates a random sequence with the pair of seeds (12345, 6789012), and
123generates one number out of the uniform deviate.
124</blockquote>
125
126<P>
127<hr><H1>RELATED ROUTINES</H1><h3>This section lists the routines related to <b><FONT COLOR="#CC0000">rand_uni</FONT></b></h3>
128
129  <DL COMPACT><DT>
130<B><A HREF="sub_planck_rng_derived_type.htm#sub:planck_rng">planck_rng</A></B>
131<DD>derived type describing RNG state
132  <DT>
133<B><A HREF="sub_rand_gauss.htm#sub:rand_gauss">rand_gauss</A></B>
134<DD>function which returns a  random normal deviate.
135<DT>
136<B><A HREF="sub_rand_init.htm#sub:rand_init">rand_init</A></B>
137<DD>subroutine to initiate a random number sequence.
138  </DL>
139
140<P>
141
142<P>
143
144
145<P>
146
147<P>
148
149<DIV CLASS="navigation"><HR>
150<!--Navigation Panel-->
151<A
152 HREF="sub_rand_init.htm">
153<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
154<A
155 HREF="sub_HEALPix_F90_subroutines.htm">
156<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
157<A
158 HREF="sub_read_asctab.htm">
159<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
160<A ID="tex2html460"
161  HREF="sub_TABLE_CONTENTS.htm">
162<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A>
163<BR>
164<B> Previous:</B> <A
165 HREF="sub_rand_init.htm">rand_init</A>
166
167<B>Up:</B> <A
168 HREF="sub_HEALPix_F90_subroutines.htm">HEALPix/F90 subroutines</A>
169
170<B> Next:</B> <A
171 HREF="sub_read_asctab.htm">read_asctab*</A>
172<B> Top:</B> <a href="main.htm">Main Page</a></DIV>
173<!--End of Navigation Panel-->
174<ADDRESS>
175Version 3.50, 2018-12-10
176</ADDRESS>
177</BODY>
178</HTML>
179