# PetscRandomGetInterval
Gets the interval over which the random numbers will be distributed.  By default, this interval is [0,1). 
## Synopsis
```
#include "petscsys.h" 
PetscErrorCode PetscRandomGetInterval(PetscRandom r, PetscScalar *low, PetscScalar *high)
```
Not collective


## Input Parameter

- ***r  -*** the random number generator context



## Output Parameters

- ***low -*** The lower bound of the interval
- ***high -*** The upper bound of the interval





## See Also
 `PetscRandom`, `PetscRandomCreate()`, `PetscRandomSetInterval()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/random/interface/random.c.html#PetscRandomGetInterval">src/sys/classes/random/interface/random.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/random/interface/random.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)  
