Skip to main content
`Ctrl`+`K`

# PetscFindReal

Finds a `PetscReal` in a sorted array of `PetscReal`s

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscFindReal(PetscReal key, PetscCount n, const PetscReal t[], PetscReal eps, PetscInt *loc)

Not Collective

## Input Parameters

- key - the value to locate

- n - number of values in the array

- t - 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

src/sys/utils/sortd.c

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages