Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rstream.incprecision-methods

Methods for Function rstream.incprecision in Package ‘rstream’


Description

Get and change the flag for increased precision of an "rstream" object in package rstream.

If the increased precision flag is on (TRUE) the "rstream" object returns random numbers with precision close to machine epsilon.

Most sources of pseudo random numbers generate random numbers of precision 2^(-32) ~ 2.e-10. When the flag is on the precision is increased to machine epsilon (i.e. ~ 1.e-16) by combining two random numbers of default precision.

Usage

## S4 method for signature 'rstream'
rstream.incprecision(stream)
rstream.incprecision(stream) <- value

Arguments

stream

an "rstream" object.

value

a boolean (TRUE or FALSE) to change the status of the flag.

Methods

Methods available for the following "rstream" subclasses: rstream.mrg32k3a.

Author(s)

See Also

Examples

## create a new rstream object (of subclass rstream.mrg32k3a)
s <- new("rstream.mrg32k3a")

## set increased precision flag of rstream object
rstream.incprecision(s) <- TRUE

## get increased precision flag of rstream object
rstream.incprecision(s)

rstream

Streams of Random Numbers

v1.3.6
GPL-2
Authors
Josef Leydold <josef.leydold@wu.ac.at>
Initial release
2020-02-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.