VF_hypotCVD_hypotCVE_hypotC
FunctionPythagoras "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/Delphiuses 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/Delphiuses 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;
DescriptionYi = sqrt( Xi2 + C2 )
This is a variant of the famous Pythagorean theorem for the hypotenuse of a right triangle.
Error handlingOVERFLOW 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 valueFALSE (0), if no error occurred, otherwise TRUE (non-zero).
See alsoVF_hypotV,   VF_redC,   VF_visC,   VCF_abs,   hypot

VectorLib Table of Contents  OptiVec home