VF_hypotC | VD_hypotC | VE_hypotC |
|
Function | Pythagoras "hypotenuse" function. |
|
Syntax C/C++ | #include <VFmath.h>
int VF_hypotC( fVector Y, fVector X, ui size, float C ); |
C++ VecObj | #include <OptiVec.h>
int vector<T>::hypotC( const vector<T>& X, const T& C ); |
Pascal/Delphi | uses VFmath;
function VF_hypotC( Y, X:fVector; size:UIntSize; C:Single ): IntBool; |
|
CUDA function C/C++ | #include <cudaVFmath.h>
int cudaVF_hypotC( fVector d_Y, fVector d_X, ui size, float C );
int cusdVF_hypotC( fVector d_Y, fVector d_X, ui size, float *d_C );
int VFcu_hypotC( fVector d_Y, fVector d_X, ui size, float C );
|
CUDA function Pascal/Delphi | uses VFmath;
function cudaVF_hypotC( d_Y, d_X:fVector; size:UIntSize; C:Single ): IntBool;
function cusdVF_hypotC( d_Y, d_X:fVector; size:UIntSize; d_C:PSingle ): IntBool;
function VF_hypotC( Y, X:fVector; size:UIntSize; C:Single ): IntBool;
|
|
Description | Yi = sqrt( Xi2 + C2 )
This is a variant of the famous Pythagorean theorem for the hypotenuse of a right triangle. |
|
Error handling | OVERFLOW errors lead to a default result of HUGE_VAL. Unlike the treatment of the ANSI C function hypot by several compilers, only an overflowing final result is regarded as an error. Intermediate overflows (by the calculation of the square) are avoided by appropriate scaling. |
|
Return value | FALSE (0), if no error occurred, otherwise TRUE (non-zero). |
|
|