Learn R Programming

Rrdrand (version 0.1-9)

Rrdrand-package: Generate Physical Random Numbers on Intel CPUs with the RdRand instruction

Description

Make use of the physical random number accessed by the RdRand instruction in recent Intel CPUs (Ivy Bridge and later).

This library defines the user_unif_rand symbol and gives back a random number of RdRand.

`hasRDRAND' returns either RdRand available by executing the CPUID.

if HasRDRAND return false of library load time, it does not change the RNGkind.

if you do changed RNGkind("user") by manual operation and RdRand is not available, you get NaN.

If you want to detach, it will be set to RNGkind of "default".

Usage

hasRDRAND()

Arguments

Details

http://prs.ism.ac.jp/~nakama/Rrdrand

Examples

Run this code
library(Rrdrand)
  if(hasRDRAND())
    print(RNGkind())
    print(runif(3))

Run the code above in your browser using DataLab