Safe Haskell | Safe-Inferred |
---|---|

Language | Haskell2010 |

## Synopsis

- countToRand :: (RealFrac a, Fractional b) => a -> b
- countToRands :: (RealFrac a, Fractional b) => a -> Int -> [b]

# Documentation

countToRand :: (RealFrac a, Fractional b) => a -> b Source #

countToRand converts a count (eg. measure of elapsed `time`

in a Tempo) to
a random value in the range [0,1) by stretching 300 counts over the range of
[0,2**29 == 536870912) and then apply a `xorshift`

algorithm. For the latter:
cf. George Marsaglia (2003). "Xorshift RNGs". Journal of Statistical Software 8:14.
https://www.jstatsoft.org/article/view/v008i14

countToRands :: (RealFrac a, Fractional b) => a -> Int -> [b] Source #

countToRands generates multiple pseudo-random values by converting the provided
count as with countToRand and then recursively using the values calculated to
generate additional pseudo-random values, as in the `normal`

usage of a pseudo-
random number geneator.