Hash :
9c7ca2ba
Author :
Date :
2023-08-20T13:23:11
ldexp: fix INT_MIN infloop * lib/ldexp.c (FUNC): Instead of converting EXP to unsigned, work on it directly. This simplifies the code and avoids an infinite loop when EXP == INT_MIN. * modules/ldexp, modules/ldexpl: Depend on stdbool. * tests/test-ldexp.h: Include <limits.h> for INT_MIN. (test_function): Test for infloop.
Description:
ldexp() function: multiply a 'double' by a power of 2.
Files:
lib/ldexp.c
m4/ldexp.m4
Depends-on:
math
isnand [test $REPLACE_LDEXP = 1]
stdbool [test $REPLACE_LDEXP = 1]
configure.ac:
gl_FUNC_LDEXP
gl_CONDITIONAL([GL_COND_OBJ_LDEXP], [test $REPLACE_LDEXP = 1])
gl_MATH_MODULE_INDICATOR([ldexp])
Makefile.am:
if GL_COND_OBJ_LDEXP
lib_SOURCES += ldexp.c
endif
Include:
<math.h>
Link:
$(LDEXP_LIBM)
License:
LGPLv2+
Maintainer:
all