VI_neg | VBI_neg | VSI_neg | VLI_neg | VQI_neg |
|
|
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/Delphi | uses 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/Delphi | uses VFmath;
function cudaVF_neg( d_Y, d_X:fVector; size:UIntSize ): IntBool;
function VFcu_neg( h_Y, h_X:fVector; size:UIntSize );
|
|
Description | Yi = - (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. |
|
|
Return value | By 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. |
|
|