# Standard Normal Random Numbers
> Create an iterator for generating pseudorandom numbers drawn from a [standard normal][normal] distribution using the [Box-Muller transform][box-muller].
## Usage
```javascript
var iterator = require( '@stdlib/random/iter/box-muller' );
```
#### iterator( \[options] )
Returns an iterator for generating pseudorandom numbers drawn from a [standard normal][normal] distribution using the [Box-Muller transform][box-muller].
```javascript
var it = iterator();
// returns
## Notes
- If an environment supports `Symbol.iterator`, the returned iterator is iterable.
- If PRNG state is "shared" (meaning a state array was provided during iterator creation and **not** copied) and one sets the underlying generator state to a state array having a different length, the iterator does **not** update the existing shared state and, instead, points to the newly provided state array. In order to synchronize the output of the underlying generator according to the new shared state array, the state array for **each** relevant iterator and/or PRNG must be **explicitly** set.
- If PRNG state is "shared" and one sets the underlying generator state to a state array of the same length, the PRNG state is updated (along with the state of all other iterator and/or PRNGs sharing the PRNG's state array).
## Examples
```javascript
var iterator = require( '@stdlib/random/iter/box-muller' );
var it;
var r;
// Create a seeded iterator for generating pseudorandom numbers:
it = iterator({
'seed': 1234,
'iter': 10
});
// Perform manual iteration...
while ( true ) {
r = it.next();
if ( r.done ) {
break;
}
console.log( r.value );
}
```
* * *
## References
- Box, G. E. P., and Mervin E. Muller. 1958. "A Note on the Generation of Random Normal Deviates." _The Annals of Mathematical Statistics_ 29 (2). The Institute of Mathematical Statistics: 610–11. doi:[10.1214/aoms/1177706645][@box:1958].
- Bell, James R. 1968. "Algorithm 334: Normal Random Deviates." _Communications of the ACM_ 11 (7). New York, NY, USA: ACM: 498. doi:[10.1145/363397.363547][@bell:1968].
- Knop, R. 1969. "Remark on Algorithm 334 \[G5]: Normal Random Deviates." _Communications of the ACM_ 12 (5). New York, NY, USA: ACM: 281. doi:[10.1145/362946.362996][@knop:1969].
- Marsaglia, G., and T. A. Bray. 1964. "A Convenient Method for Generating Normal Variables." _SIAM Review_ 6 (3). Society for Industrial; Applied Mathematics: 260–64. doi:[10.1137/1006063][@marsaglia:1964a].
- Thomas, David B., Wayne Luk, Philip H.W. Leong, and John D. Villasenor. 2007. "Gaussian Random Number Generators." _ACM Computing Surveys_ 39 (4). New York, NY, USA: ACM. doi:[10.1145/1287620.1287622][@thomas:2007].
[box-muller]: https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform
[normal]: https://en.wikipedia.org/wiki/Normal_distribution
[@box:1958]: http://dx.doi.org/10.1214/aoms/1177706645
[@bell:1968]: http://dx.doi.org/10.1145/363397.363547
[@knop:1969]: http://dx.doi.org/10.1145/362946.362996
[@marsaglia:1964a]: http://dx.doi.org/10.1137/1006063
[@thomas:2007]: http://dx.doi.org/10.1145/1287620.128762
[@stdlib/array/uint32]: https://www.npmjs.com/package/@stdlib/array-uint32