# PetscMax

Returns maxium of two numbers

### Input Parameter

| v1 | - first value to find maximum of
| v2 | - second value to find maximum of

### Synopsis

    type max PetscMax(type v1,type v2)

Notes: type can be integer or floating point value

### See Also

PetscMin(), PetscAbsInt(), PetscAbsReal(), PetscSqr()

Level:beginner
Location: include/petscmath.h
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/mat/examples/tutorials/ex5.c.html
src/snes/examples/tutorials/ex29.c.html
src/snes/examples/tutorials/ex30.c.html
src/ts/examples/tutorials/ex1.c.html