1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 7 #include <math.h> 8 log2(double x)9double log2(double x) 10 { 11 return log(x) / 0.69314718246459960938; 12 } 13 log2f(float x)14float log2f(float x) 15 { 16 return logf(x) / 0.69314718246459960938f; 17 } 18 log2l(long double x)19long double log2l(long double x) 20 { 21 #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) 22 return log2(x); 23 #else 24 #error Not supported on your platform yet 25 #endif 26 } 27