:orphan:
# PetscFindReal
Finds a PetscReal` in a sorted array of `PetscReal`s 
## Synopsis
```
#include "petscsys.h"  
PetscErrorCode PetscFindReal(PetscReal key, PetscInt n, const PetscReal t[], PetscReal eps, PetscInt *loc)
```
Not Collective


## Input Parameters

- ***key -*** the value to locate
- ***n   -*** number of values in the array
- ***ii  -*** array of values
- ***eps -*** tolerance used to compare



## Output Parameter

- ***loc -*** the location if found, otherwise -(slot+1) where slot is the place the value would go





## See Also
 `PetscSortReal()`, `PetscSortRealWithArrayInt()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/utils/sortd.c.html#PetscFindReal">src/sys/utils/sortd.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/utils/sortd.c)


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