:orphan:
# PetscPDFSampleGaussian1D
Sample uniformly from a Gaussian distribution in 1D 
## Synopsis
```
#include "petscdt.h" 
PetscErrorCode PetscPDFSampleGaussian1D(const PetscReal p[], const PetscReal dummy[], PetscReal x[])
```
Not Collective


## Input Parameters

- ***p -*** A uniform variable on [0, 1]
- ***dummy -*** ignored



## Output Parameter

- ***x -*** Coordinate in [-\infty, \infty]




Note: http://www.mimirgames.com/articles/programming/approximations-of-the-inverse-error-function/
https://stackoverflow.com/questions/27229371/inverse-error-function-in-c

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/interface/dtprob.c.html#PetscPDFSampleGaussian1D">src/dm/dt/interface/dtprob.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/dt/interface/dtprob.c)


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