# NAG Library Function Documentnag_random_init_nonrepeatable (g05ccc)

## 1  Purpose

nag_random_init_nonrepeatable (g05ccc) sets the seed used by the basic generator in Chapter g05 to a non-repeatable initial value.

## 2  Specification

#include <nag.h>
#include <nagg05.h>

void  nag_random_init_nonrepeatable ()

## 3  Description

nag_random_init_nonrepeatable (g05ccc) sets the internal seed used by the basic generator nag_random_continuous_uniform (g05cac) to a value ${n}_{0}$ calculated from the setting of the real-time clock. It then generates the value ${n}_{1}$ and discards it, i.e., the first available value is ${n}_{2}$.
This function will yield different subsequent sequences of random numbers in different runs of the calling program. It should be noted that there is no guarantee of statistical properties between sequences, only within sequences.

None.

None.

None.

Not applicable.

None.

## 9  Example

The example program prints the first five pseudorandom real numbers from a uniform distribution between 0 and 1, generated by nag_random_continuous_uniform (g05cac) after initialization by nag_random_init_nonrepeatable (g05ccc). The program should give different results each time it is run.

### 9.1  Program Text

Program Text (g05ccce.c)

None.

### 9.3  Program Results

Program Results (g05ccce.r)
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 3, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.618812084197998, "perplexity_flag": "middle"}