rexp: rexp

Description Usage Arguments Details References

Description

Generate from a exponential distribution using a gpu.

Usage

1
rexp(n, rate = 1, seed = getseed(), type = "double")

Arguments

n

The number of values to generate

rate

Parameter for exponential random variables.

seed

Seed for the random number generation.

type

'double' or 'float'

Details

We use the cuRAND uniform generator together with the fact that if X \sim U(0, 1) then Y = -λ^{-1}\log(X) \sim Exp(λ).

References

Casella, G. and Berger, R.L., 2002. Statistical inference (Vol. 2). Pacific Grove, CA: Duxbury.

Rizzo, M.L., 2007. Statistical computing with R. Chapman and Hall/CRC.


wrathematics/curand documentation built on May 20, 2019, 9:57 a.m.