# VecMaxPointwiseDivide
Computes the maximum of the componentwise division max = max_i abs(x_i/y_i). 
## Synopsis
```
#include "petscvec.h"   
PetscErrorCode VecMaxPointwiseDivide(Vec x, Vec y, PetscReal *max)
```
Logically Collective on x


## Input Parameters

- ***x, y  -*** the vectors



## Output Parameter

- ***max -*** the result





## Notes
x and y may be the same vector

if a particular y_i is zero, it is treated as 1 in the above formula


## See Also
 `Vec`, `VecPointwiseDivide()`, `VecPointwiseMult()`, `VecPointwiseMax()`, `VecPointwiseMin()`, `VecPointwiseMaxAbs()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/interface/rvector.c.html#VecMaxPointwiseDivide">src/vec/vec/interface/rvector.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/impls/nest/vecnest.c.html#VecMaxPointwiseDivide_Nest">VecMaxPointwiseDivide_Nest in src/vec/vec/impls/nest/vecnest.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/impls/seq/dvec2.c.html#VecMaxPointwiseDivide_Seq">VecMaxPointwiseDivide_Seq in src/vec/vec/impls/seq/dvec2.c</A><BR>


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


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