| VCFx_log2 | VCDx_log2 | VCEx_log2 |
| VPF_log2toC | VPD_log2toC | VPE_log2toC |
|
|
| Syntax C/C++ | #include <VFmath.h>
int VF_log2( fVector Y, fVector X, ui size );
int VFx_log2( fVector Y, fVector X, ui size, float A, float B, float C );
int VPF_log2toC( cfVector Y, pfVector X, ui size ); |
| C++ VecObj | #include <OptiVec.h>
int vector<T>::log2( const vector<T>& X );
int vector<T>::x_log2( const vector<polar<T>>& X, const T& A, const T& B, const T& C );
int vector<complex<T>>::log2toC( const vector<T>& X ); |
| Pascal/Delphi | uses VFmath;
function VF_log2( Y, X:fVector; size:UIntSize ): IntBool;
function VFx_log2( Y, X:fVector; size:UIntSize; A, B, C:Single ): IntBool;
function VPF_log2toC( Y:cfVector; X:pfVector; size:UIntSize ): IntBool; |
|
| Description | normal versions: Yi = lb( Xi )
expanded versions: Yi = C * lb( A*Xi+B )
The binary logarithm (to the basis 2) is calculated. |
|
| Error handling | Real versions: DOMAIN errors occur in the case of negative Xi (including -0.0), with NAN ("not-a-number") as the default result. SING errors occur for Xi= +0.0 and yield a result of -HUGE_VAL. In the complex version, numbers with an imaginary part of zero are always treated as real numbers; therefore, an argument {0, 0} is treated as a real 0, causing a SING error with the default result {-HUGE_VAL, 0}. |
|
| Return value | FALSE (0), if no error occurred, otherwise TRUE (non-zero) |
|
| See also | VF_pow2, VF_log, VF_log10, VF_pow, log2 (the latter function is neither defined in ANSI C nor in Pascal/Delphi, but an addition contained in <xmath.h> or in the unit XMATH). |
|