:orphan: # PetscAbs Returns the absolute value of a number ## Synopsis ``` #include type PetscAbs(type v) ``` Not Collective ## Input Parameter - ***v -*** the number ## Note The type can be integer or real floating point value, but cannot be complex ## See Also `PetscAbsInt()`, `PetscAbsReal()`, `PetscAbsScalar()`, `PetscSign()` ## Level beginner ## Location include/petscmath.h ## Examples src/ksp/ksp/tutorials/ex42.c
src/ksp/ksp/tutorials/ex43.c
src/ksp/ksp/tutorials/ex49.c
src/ksp/ksp/tutorials/ex76.c
src/snes/tutorials/ex56.c
src/snes/tutorials/ex77.c
src/ts/tutorials/ex9.c
src/ts/utils/dmplexlandau/tutorials/ex2.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)