VF_negVD_negVE_neg
VCF_negVCD_negVCE_neg
VPF_negVPD_negVPE_neg
VI_negVBI_negVSI_negVLI_negVQI_neg
FunctionNegation
Syntax C/C++#include <VFmath.h>
int VF_neg( fVector Y, fVector X, ui size );
C++ VecObj#include <OptiVec.h>
int vector<T>::neg( const vector<T>& X );
Pascal/Delphiuses VFmath;
function VF_neg( Y, X:fVector; size:UIntSize ): IntBool;
CUDA function C/C++#include <cudaVFmath.h>
int cudaVF_neg( fVector d_Y, fVector d_X, ui size );
int VFcu_neg( fVector h_Y, fVector h_X, ui size );
CUDA function Pascal/Delphiuses VFmath;
function cudaVF_neg( d_Y, d_X:fVector; size:UIntSize ): IntBool;
function VFcu_neg( h_Y, h_X:fVector; size:UIntSize );
DescriptionYi = - (Xi)
VBI_,   VSI_,   VI_, and VLI_ versions only: the negation of the most negative number possible (-128 for byte/ByteInt, -32768 for short/SmallInt, -2147483648 for long/LongInt) is again the same - negative! - number. This is due to the implicit modulo-2n arithmetics, where the overflowing byte/ByteInt, +128, is stored as -128, the overflowing short/SmallInt, +32768, is stored as -32768, and the overflowing long/LongInt, +2147483648, is stored as -2147483648.
Error handlingnone
Return valueBy analogy with VF_abs, the floating-point versions are treated as math functions. Therefore, they have a return value which, since no errors can occur, is always FALSE (0). The integer versions have no return value.
See alsoVF_abs,   VCF_conj

VectorLib Table of Contents  OptiVec home