VF_squareVD_squareVE_square
VFx_squareVDx_squareVEx_square
VFu_squareVDu_squareVEu_square
VFux_squareVDux_squareVEux_square
VCF_squareVCD_squareVCE_square
VCFx_squareVCDx_squareVCEx_square
VCFu_squareVCDu_squareVCEu_square
VCFux_squareVCDux_squareVCEux_square
VPF_squareVPD_squareVPE_square
VPFu_squareVPDu_squareVPEu_square
FunctionSquare
Syntax C/C++#include <VFmath.h>
int VF_square( fVector Y, fVector X, ui size );
int VFx_square( fVector Y, fVector X, ui size, float A, float B );
int VFu_square( fVector Y, fVector X, ui size );
int VFux_square( fVector Y, fVector X, ui size, float A, float B );
C++ VecObj#include <OptiVec.h>
int vector<T>::square( const vector<T>& X );
int vector<T>::x_square( const vector<T>& X, const T& A, const T& B );
int vector<T>::u_square( const vector<T>& X );
int vector<T>::ux_square( const vector<T>& X, const T& A, const T& B );
Pascal/Delphiuses VFmath;
function VF_square( Y, X:fVector; size:UIntSize ): IntBool;
function VFx_square( Y, X:fVector; size:UIntSize; A, B:Single ): IntBool;
function VFu_square( Y, X:fVector; size:UIntSize ): IntBool;
function VFux_square( Y, X:fVector; size:UIntSize; A, B:Single ): IntBool;
Descriptionnormal versions: Yi = Xi2
expanded versions: Yi = (A*Xi+B)2

The "unprotected" versions (prefix VFu_,   VFux_, etc.) do not perform any error handling, which makes them much faster (up to 50%), but riskier than the standard versions. The extended-precision complex (VCEu_ and VCEux_) versions do not take some of the security measures present in the standard version and might fail for results very near the overflow limit; results near the underflow limit might be rendered as 0.

Error handlingOVERFLOW errors lead to a default result of HUGE_VAL.
Return valueFALSE (0), if no error occurred, otherwise TRUE (non-zero)
See alsoVF_cubic,   VF_sqrt,   VF_pow,   VF_ipow,   VF_poly

VectorLib Table of Contents  OptiVec home