| VF_powexp | VD_powexp | VE_powexp |
| VFx_powexp | VDx_powexp | VEx_powexp |
|
| Function | Power 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/Delphi | uses 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; |
|
| Description | normal 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 handling | DOMAIN 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 value | FALSE (0), if no error occurred, otherwise TRUE (non-zero) |
|
|