00001
00002
00003
00004
00005
00006
00007
00008 #ifdef USE_STD
00009 #include <cmath>
00010 using namespace std;
00011 #else
00012 #include <math.h>
00013 #endif
00014
00015 #ifdef STORM_USEF
00016 #include "ilog2_.h"
00017 #include "dilog2_.h"
00018 #endif
00019
00020 int ilog2( const float& val)
00021 {
00022 int itmp;
00023 #ifdef STORM_USEF
00024 ilog2_( &val, &itmp );
00025 #else
00026 #endif
00027 return itmp;
00028 }
00029
00030 int ilog2( const double& val )
00031 {
00032 int itmp;
00033 #ifdef STORM_USEF
00034 dilog2_( &val, &itmp );
00035 #else
00036 #endif
00037 return itmp;
00038 }
00039
00040