PetscAbs#

Returns the absolute value of a number

Synopsis#

#include <petscmath.h>
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

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