# PetscSign
Returns the sign of a number as an integer 
## Synopsis
```
#include <petscmath.h>
int PetscSign(type v)
```
Not Collective


## Input Parameter

- ***v -*** the number



## Note
The type can be integer or real floating point value




## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscmath.h.html#PetscSign">include/petscmath.h</A>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
