VF_powexpVD_powexpVE_powexp
VFx_powexpVDx_powexpVEx_powexp
FunctionPower function, multiplied by exponential function
Syntax C/C++#include <VFmath.h>
int VF_powexp( fVector Y, fVector X, ui size, float Expo );
int VFx_powexp( fVector Y, fVector X, ui size, float Expo, float A, float B, float C );
C++ VecObj#include <OptiVec.h>
int vector<T>::powexp( const vector<T>& X, const T& Expo );
int vector<T>::x_powexp( const vector<T>& X, const T& Expo, const T& A, const T& B, const T& C );
Pascal/Delphiuses VFmath;
function VF_powexp( Y, X:fVector; size:UIntSize; Expo:Single ): IntBool;
function VFx_powexp( Y, X:fVector; size:UIntSize; Expo, A, B, C:Single ): IntBool;
CUDA function C/C++#include <cudaVFmath.h>
int cudaVF_powexp( fVector d_Y, fVector d_X, ui size, float Expo );
int cudaVFx_powexp( fVector d_Y, fVector d_X, ui size, float Expo, float A, float B, float C );
int cusdVFx_powexp( fVector d_Y, fVector d_X, ui size, float Expo, float *_dA, float *d_B, float *d_C );
int VFcu_powexp( fVector h_Y, fVector h_X, ui size, float Expo );
int VFxcu_powexp( fVector h_Y, fVector h_X, ui size, float Expo, float A, float B, float C );
CUDA function Pascal/Delphiuses VFmath;
function cudaVF_powexp( d_Y, d_X:fVector; size:UIntSize; Expo:Single ): IntBool;
function cudaVFx_powexp( d_Y, d_X:fVector; size:UIntSize; Expo:Single; A, B, C:Single ): IntBool;
function cusdVFx_powexp( d_Y, d_X:fVector; size:UIntSize; Expo:Single; d_A, d_B, d_C:PSingle ): IntBool;
function VFcu_powexp( h_Y, h_X:fVector; size:UIntSize; Expo:Single ): IntBool;
function VFxcu_powexp( h_Y, h_X:fVector; size:UIntSize; Expo:Single; A, B, C:Single ): IntBool;
Descriptionsimple versions: Yi = XiExpo * exp(Xi)
expanded versions: Yi = C * (XiExpo) * exp(A*Xi+B)

Note for the expanded versions that (A*Xi+B) is taken only as the argument of the exponential function, whereas the power function is calculated for (Xi).
The implementation of this function guarantees the correct cancellation of potential simultaneous overflow and underflow of the two constituting factors (for large Xi, if either Expo or A*Xi – but not both – are negative, so that either the power function or the exponential function would yield a very small result, while the other would yield an overflowing result).
In contrast to VF_pow, negative X values in the power function always lead to a DOMAIN error, even if Expo is an integer.

Error handlingDOMAIN errors are caused by negative Xi; the default result is NAN ("not-a-number"). SING errors occur, if zero is raised to a negative power; the default result is ±HUGE_VAL, which is true for OVERFLOW errors as well.
Return valueFALSE (0), if no error occurred, otherwise TRUE (non-zero)
See alsoVF_pow,   VF_poly,   VF_exp,   pow,  exp

VectorLib Table of Contents  OptiVec home