VF_ipowVD_ipowVE_ipow
VFx_ipowVDx_ipowVEx_ipow
VFu_ipowVDu_ipowVEu_ipow
VFux_ipowVDux_ipowVEux_ipow
VCF_ipowVCD_ipowVCE_ipow
VCFx_ipowVCDx_ipowVCEx_ipow
VCFu_ipowVCDu_ipowVCEu_ipow
VCFux_ipowVCDux_ipowVCEux_ipow
VPF_ipowVPD_ipowVPE_ipow
VPFu_ipowVPDu_ipowVPEu_ipow
FunctionRaise each element of a vector to a specified integer power.
Syntax C/C++#include <VFmath.h>
int VF_ipow( fVector Y, fVector X, ui size, int Expo );
int VFx_ipow( fVector Y, fVector X, ui size, int Expo, float A, float B, float C );
int VFu_ipow( fVector Y, fVector X, ui size, int Expo );
int VFux_ipow( fVector Y, fVector X, ui size, int Expo, float A, float B, float C );
C++ VecObj#include <OptiVec.h>
int vector<T>::ipow( const vector<T>& X );
int vector<T>::x_ipow( const vector<T>& X, const T& A, const T& B, const T& C );
int vector<T>::u_ipow( const vector<T>& X );
int vector<T>::ux_ipow( const vector<T>& X, const T& A, const T& B, const T& C );
Pascal/Delphiuses VFmath;
function VF_ipow( Y, X:fVector; size:UIntSize; ipow:Integer ): IntBool;
function VFx_ipow( Y, X:fVector; size:UIntSize; ipow:Integer; A, B, C:Single ): IntBool;
function VFu_ipow( Y, X:fVector; size:UIntSize; ipow:Integer ): IntBool;
function VFux_ipow( Y, X:fVector; size:UIntSize; ipow:Integer; A, B, C:Single ): IntBool;
Descriptionnormal versions: Yi = XiExpo
expanded versions: Yi = C * (A*Xi+B)Expo
If Expo is larger than a data-type dependent threshold (which will be a very rare occasion), VF_ipow does not calculate the result itself, but calls VF_pow, which is safer and faster in this case.
The "unprotected" versions (prefix VFu_ and VFux_) do not perform any error handling and do not redirect calls to VF_pow. These simplifications make them very fast, but also risky; they should be used very carefully.
Error handlingSING errors occur, if zero is raised to a negative power; the default result is ±HUGE_VAL, as in the case of OVERFLOW errors.
Return valueFALSE (0), if no error occurred, otherwise TRUE (non-zero)
See alsoVF_pow,   VF_poly,   VF_pow2,   VF_exp,  pow

VectorLib Table of Contents  OptiVec home