Skip to content

Commit

Permalink
Merge f2c642c into b15e1ef
Browse files Browse the repository at this point in the history
  • Loading branch information
v923z committed Jun 5, 2021
2 parents b15e1ef + f2c642c commit 5164356
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/libm/math.c
Expand Up @@ -56,6 +56,9 @@ float copysignf(float x, float y) {
static const float _M_LN10 = 2.30258509299404f; // 0x40135d8e
float log10f(float x) { return logf(x) / (float)_M_LN10; }

static const float M_LN2 = 0.6931471805599453f;
float log2f(float x) { return logf(x) / (float)M_LN2; }

float tanhf(float x) {
int sign = 0;
if (x < 0) {
Expand Down
10 changes: 9 additions & 1 deletion ports/nrf/Makefile
Expand Up @@ -160,8 +160,16 @@ SRC_LIB += $(addprefix lib/,\
libm/sf_modf.c \
libm/sf_ldexp.c \
libm/asinfacosf.c \
libm/acoshf.c \
libm/asinhf.c \
libm/atanf.c \
libm/atan2f.c \
libm/atanhf.c \
libm/log1pf.c \
libm/sf_erf.c \
libm/erf_lgamma.c \
libm/wf_lgamma.c \
libm/wf_tgamma.c \
libm/roundf.c \
)

Expand Down Expand Up @@ -481,7 +489,7 @@ $(BUILD)/$(OUTPUT_FILENAME).elf: $(OBJ)
$(Q)$(SIZE) $@

# List of sources for qstr extraction
SRC_QSTR += $(SRC_C) $(SRC_LIB) $(DRIVERS_SRC_C) $(SRC_BOARD_MODULES) $(SRC_MOD)
SRC_QSTR += $(SRC_C) $(SRC_LIB) $(DRIVERS_SRC_C) $(SRC_BOARD_MODULES) $(SRC_MOD)

# Append any auto-generated sources that are needed by sources listed in
# SRC_QSTR
Expand Down

0 comments on commit 5164356

Please sign in to comment.