lean4-htt/src/util/bit_tricks.h
Nuno Lopes 9152aaa7d6 fix(bit_tricks): make sure no one calls math.h's log2()
this fixes the bit_trick test with MSVC
2018-03-06 11:21:28 -08:00

13 lines
316 B
C++

/*
Copyright (c) 2013 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
namespace lean {
inline bool is_power_of_two(unsigned v) { return !(v & (v - 1)) && v; }
unsigned log2(unsigned v);
double log2(int v);
}