Google OR-Tools: ortools/util/cached_log.cc Source File
Go to the documentation of this file.
25double FastLog2(int64_t input) {
26#if defined(_MSC_VER) || defined(__ANDROID__)
27 return log(static_cast<double>(input)) / log(2.0L);
29 return log2(input);
44 CHECK_GE(input, 1);
45 if (input <= cache_.size()) {
46 return cache_[input - 1];
48 return FastLog2(input);
double Log2(int64_t input) const
Definition cached_log.cc:43
void Init(int cache_size)
Definition cached_log.cc:34
CachedLog()
Definition cached_log.cc:20
~CachedLog()
Definition cached_log.cc:22
static int input(yyscan_t yyscanner)