diff options
Diffstat (limited to 'lib/libm/math.c')
| -rw-r--r-- | lib/libm/math.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libm/math.c b/lib/libm/math.c index 39c6a68a5..0e53563bc 100644 --- a/lib/libm/math.c +++ b/lib/libm/math.c @@ -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)) { |
