:orphan: # PetscMax Returns maximum of two numbers ## Synopsis ``` #include type max PetscMax(type v1,type v2) ``` Not Collective ## Input Parameters - ***v1 -*** first value to find maximum of - ***v2 -*** second value to find maximum of ## Note The type can be integer or floating point value ## See Also `PetscMin()`, `PetscClipInterval()`, `PetscAbsInt()`, `PetscAbsReal()`, `PetscSqr()` ## Level beginner ## Location include/petscmath.h ## Examples src/dm/impls/plex/tutorials/ex11.c
src/ksp/ksp/tutorials/ex70.c
src/ksp/ksp/tutorials/ex81.c
src/snes/tutorials/ex30.c
src/snes/tutorials/ex48.c
src/tao/bound/tutorials/plate2.c
src/tao/complementarity/tutorials/blackscholes.c
src/tao/tutorials/ex4.c
src/ts/tutorials/ex1.c
src/ts/tutorials/ex11.c
src/ts/tutorials/ex11_sa.c
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscmath.h) [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)