# PETSCRAND
access to the basic Unix random number generator 
## Options Database Keys

- ***-random_type <rand,rand48,sprng> -*** set the random number generator from the options database





## Note
Not recommended since it can produce different numbers on different systems


## See Also
 `PetscRandomCreate()`, `PetscRandomSetType()`, `PETSCRAND48`, `PETSCSPRNG`, `PetscRandomSetFromOptions()`, `PetscRandomType`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/random/impls/rand/rand.c.html#PETSCRAND">src/sys/classes/random/impls/rand/rand.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/random/impls/rand/rand.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
