log2log2llog2d
FunctionBinary logarithm
Syntax C/C++#include <xmath.h>
double       log2( double x );
long double  log2l( long double x );
Pascal/Delphiuses xmath;
function log2( x:Extended ): Extended;
function log2d( x:Double ): Double;
DescriptionThe logarithm of the argument to the basis 2 is calculated and the result returned.
Error handlingA DOMAIN error with NAN ("not-a-number") as return value results from x < 0 (including -0). A SING error with -HUGE_VAL as return value results from x=0.
In C/C++, the handling of both errors can be modified via _matherr or _matherrl, resp.
Return valueThe binary logarithm of the argument is returned.
See alsolog,   log10,   VF_log2

VectorLib Table of Contents  OptiVec home