:orphan:
# VecSqrtAbs
Replaces each component of a vector by the square root of its magnitude. 
## Synopsis
```
#include "petscvec.h" 
PetscErrorCode VecSqrtAbs(Vec v)
```
Not Collective


## Input Parameter

- ***v -*** The vector





## Note
The actual function is sqrt(|x_i|)


## See Also
 `Vec`, `VecLog()`, `VecExp()`, `VecReciprocal()`, `VecAbs()`


## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/utils/vinv.c.html#VecSqrtAbs">src/vec/vec/utils/vinv.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/constrained/tutorials/tomographyADMM.c.html">src/tao/constrained/tutorials/tomographyADMM.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/tutorials/ex4.c.html">src/tao/tutorials/ex4.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/utils/vinv.c)


[Index of all Vec routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
