1 #ifndef _EXT_GRS_AUXILARY_T_H_
2 #define _EXT_GRS_AUXILARY_T_H_
11 #define ARR_SIZE(a) (sizeof(a)/sizeof(a[0]))
15 #define _ext_grs_MAX_LOG 10000
16 extern double _ext_grs_log_table[_ext_grs_MAX_LOG];
17 extern double _ext_grs_ln2;
20 void _ext_grs_log_table_init(void);
22 static double INLINE _log2(int x) {
24 if (x >= ARR_SIZE(_ext_grs_log_table))
25 return log(x) / _ext_grs_ln2;
27 return _ext_grs_log_table[x];
32 #endif /* _EXT_GRS_AUXILARY_T_H_ */