summaryrefslogtreecommitdiff
path: root/devdocs/c/numeric%2Frandom%2Frand_max.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
committerCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
commit82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch)
tree158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/c/numeric%2Frandom%2Frand_max.html
parent9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff)
downloaddotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz
dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/c/numeric%2Frandom%2Frand_max.html')
-rw-r--r--devdocs/c/numeric%2Frandom%2Frand_max.html34
1 files changed, 0 insertions, 34 deletions
diff --git a/devdocs/c/numeric%2Frandom%2Frand_max.html b/devdocs/c/numeric%2Frandom%2Frand_max.html
deleted file mode 100644
index 3e146e2f..00000000
--- a/devdocs/c/numeric%2Frandom%2Frand_max.html
+++ /dev/null
@@ -1,34 +0,0 @@
- <h1 id="firstHeading" class="firstHeading">RAND_MAX</h1> <table class="t-dcl-begin"> <tr class="t-dsc-header"> <th> Defined in header <code>&lt;stdlib.h&gt;</code> </th> <th> </th> <th> </th> </tr> <tr class="t-dcl"> <td class="t-dcl-nopad"> <pre data-language="c">#define RAND_MAX /*implementation defined*/</pre>
-</td> <td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> </table> <p>Expands to an integer constant expression equal to the maximum value returned by the function <code><a href="rand" title="c/numeric/random/rand">rand()</a></code>. This value is implementation dependent. It's guaranteed that this value is at least <code>32767</code>.</p>
-<h3 id="Example"> Example</h3> <div class="t-example"> <div class="c source-c"><pre data-language="c">#include &lt;limits.h&gt;
-#include &lt;stdio.h&gt;
-#include &lt;stdlib.h&gt;
-#include &lt;time.h&gt;
-
-int main(void)
-{
- srand(time(NULL)); // use current time as seed for random generator
- printf("RAND_MAX: %i\n", RAND_MAX);
- printf("INT_MAX: %i\n", INT_MAX);
- printf("Random value on [0,1]: %f\n", (double)rand() / RAND_MAX);
-}</pre></div> <p>Possible output:</p>
-<div class="text source-text"><pre data-language="c">RAND_MAX: 2147483647
-INT_MAX: 2147483647
-Random value on [0,1]: 0.362509</pre></div> </div> <h3 id="References"> References</h3> <ul>
-<li> C17 standard (ISO/IEC 9899:2018): </li>
-<ul><li> 7.22/3 General utilities &lt;stdlib.h&gt; (p: 248) </li></ul>
-<li> C11 standard (ISO/IEC 9899:2011): </li>
-<ul><li> 7.22/3 General utilities &lt;stdlib.h&gt; (p: 340) </li></ul>
-<li> C99 standard (ISO/IEC 9899:1999): </li>
-<ul><li> 7.20/3 General utilities &lt;stdlib.h&gt; (p: 306) </li></ul>
-<li> C89/C90 standard (ISO/IEC 9899:1990): </li>
-<ul><li> 4.10 GENERAL UTILITIES &lt;stdlib.h&gt; </li></ul>
-</ul> <h3 id="See_also"> See also</h3> <table class="t-dsc-begin"> <tr class="t-dsc"> <td> <div><a href="rand" title="c/numeric/random/rand"> <span class="t-lines"><span>rand</span></span></a></div> </td> <td> generates a pseudo-random number <br> <span class="t-mark">(function)</span> </td>
-</tr> <tr class="t-dsc"> <td> <div><a href="srand" title="c/numeric/random/srand"> <span class="t-lines"><span>srand</span></span></a></div> </td> <td> seeds pseudo-random number generator <br> <span class="t-mark">(function)</span> </td>
-</tr> <tr class="t-dsc"> <td colspan="2"> <span><a href="https://en.cppreference.com/w/cpp/numeric/random/RAND_MAX" title="cpp/numeric/random/RAND MAX">C++ documentation</a></span> for <code>RAND_MAX</code> </td>
-</tr> </table> <div class="_attribution">
- <p class="_attribution-p">
- &copy; cppreference.com<br>Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.<br>
- <a href="https://en.cppreference.com/w/c/numeric/random/RAND_MAX" class="_attribution-link">https://en.cppreference.com/w/c/numeric/random/RAND_MAX</a>
- </p>
-</div>