PetscAbsReal — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscAbsReal

Returns the absolute value of a real number

## Synopsis

    #include <petscmath.h>
    Real abs PetscAbsReal(PetscReal v1)

## Input Parameter

- v1 - the `PetscReal` value

## See Also

`PetscReal`, `PetscMax()`, `PetscMin()`, `PetscAbsInt()`, `PetscSqr()`

## Level

beginner

## Location

include/petscmath.h

## Examples

src/dm/tutorials/ex15.c
src/snes/tutorials/ex13.c
src/tao/unconstrained/tutorials/elastic_net_regularization.c
src/ksp/ksp/tutorials/ex51.c
src/snes/tutorials/ex30.c
src/snes/tutorials/ex12.c
src/snes/tutorials/ex15.c
src/snes/tutorials/ex27.c
src/mat/tutorials/ex3.c
src/dm/impls/stag/tutorials/ex4.c

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