|
Function | Inverse (Reciprocal) |
|
Syntax C/C++ | #include <VFmath.h>
int VF_inv( fVector Y, fVector X, ui size );
int VFx_inv( fVector Y, fVector X, ui size, float A, float B ); |
int VFu_inv( fVector Y, fVector X, ui size );
int VFux_inv( fVector Y, fVector X, ui size, float A, float B );
C++ VecObj | #include <OptiVec.h>
int vector<T>::inv( const vector<T>& X );
int vector<T>::x_inv( const vector<T>& X, const T& A, const T& B );
int vector<T>::u_inv( const vector<T>& X );
int vector<T>::ux_inv( const vector<T>& X, const T& A, const T& B );
|
Pascal/Delphi | uses VFmath;
function VF_inv( Y, X:fVector; size:UIntSize ): IntBool;
function VFx_inv( Y, X:fVector; size:UIntSize; A, B:Single ): IntBool;
function VFu_inv( Y, X:fVector; size:UIntSize ): IntBool;
function VFux_inv( Y, X:fVector; size:UIntSize; A, B:Single ): IntBool;
|
|
CUDA function C/C++ | #include <cudaVFmath.h>
int cudaVF_inv( fVector d_Y, fVector d_X, ui size );
int cudaVFx_inv( fVector d_Y, fVector d_X, ui size, float A, float B );
int cusdVFx_inv( fVector d_Y, fVector d_X, ui size, float *d_A, float *d_B );
int VFcu_inv( fVector h_Y, fVector h_X, ui size );
int VFxcu_inv( fVector h_Y, fVector h_X, ui size, float A, float B );
|
CUDA function Pascal/Delphi | uses VFmath;
function cudaVF_inv( d_Y, d_X:fVector; size:UIntSize ): IntBool;
function cudaVFx_inv( d_Y, d_X:fVector; size:UIntSize; A, B:Single ): IntBool;
function cusdVFx_inv( d_Y, d_X:fVector; size:UIntSize; d_A, d_B:PSingle ): IntBool;
function VFcu_inv( h_Y, h_X:fVector; size:UIntSize ): IntBool;
function VFxcu_inv( h_Y, h_X:fVector; size:UIntSize; A, B:Single ): IntBool;
|
|
Description | simple versions: Yi = 1.0 / Xi
expanded versions: Yi = 1.0 / (A*Xi+B) |
|
Error handling | Normal versions (VF_, VFx_ etc.): SING and OVERFLOW errors lead to a result of ±HUGE_VAL.
Unprotected versions (VFu_, VFux_ etc.): no error handling. |
|
Return value | FALSE (0), if no error occurred, otherwise TRUE (non-zero) |
|
|