libm: Provide log2f

This commit is contained in:
Jeff Epler 2020-02-04 09:41:44 -06:00 committed by Jeff Epler
parent 41e71485af
commit 50438b51aa
1 changed files with 3 additions and 0 deletions

View File

@ -50,6 +50,9 @@ float copysignf(float x, float y) {
static const float _M_LN10 = 2.30258509299404; // 0x40135d8e
float log10f(float x) { return logf(x) / (float)_M_LN10; }
#undef _M_LN2
static const float _M_LN2 = 0.6931472;
float log2f(float x) { return logf(x) / (float)_M_LN2; }
float tanhf(float x) {
if (isinf(x)) {