FunctionFind the largest relative deviation between corresponding elements of two vectors.
Syntax C/C++#include <VFstd.h>
float VF_maxreldevV( fVector X, fVector Y, ui size );
C++ VecObj#include <OptiVec.h>
T vector<T>::maxreldevV( const vector<T>& Y );
Pascal/Delphiuses VFstd;
function VF_maxreldevV( X, Y:fVector; size:UIntSize ): Single;
CUDA function C/C++#include <cudaVFstd.h>
int cudaVF_maxreldevV( float *h_RetVal, fVector X, fVector Y, ui size );
int cusdVF_maxreldevV( float *d_RetVal, fVector X, fVector Y, ui size );
float VFcu_maxreldevV( fVector h_X, fVector h_Y, ui size );
CUDA function Pascal/Delphiuses VFstd;
function cudaVF_maxreldevV( var h_RetVal:Single; d_X, d_Y:fVector; size:UIntSize ): IntBool;
function cusdVF_maxreldevV( d_RetVal:PSingle; d_X, d_Y:fVector; size:UIntSize ): IntBool;
function VFcu_avdevC( h_X, h_Y:fVector; size:UIntSize ): Single;
DescriptionThe relative deviation (in absolute terms) between corresponding vectors X and Y is calculated as
reldev = |Xi − Xi |  /  max( |Xi|, |Yi| )
and the largest reldev encountered is returned. If both Xi and Yi are zero, reldev is taken as zero, too (thus avoiding an undefined 0/0 situation).
Error handlingnone
Return valuemaximum relative deviation encountered.
See alsoVF_maxreldevC,   VF_maxdevV,,   VF_maxindreldevC,   VF_reldevC

VectorLib Table of Contents  OptiVec home