diff options
author | Marcus Haehnel <marcus.haehnel@kernkonzept.com> | 2024-07-09 09:39:33 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2024-07-09 09:53:21 +0200 |
commit | ee077ec4d9351c9f9c3e1293dfb3da8e1fe36261 (patch) | |
tree | a01bed318ebc340ad4b1f61719443a166200f128 /libm/s_expm1.c | |
parent | 5820f4b5860f97c66b01bc8e25ea876ae4f07478 (diff) |
libm: Fix float conversion compiler warning
Make two implicit casts from double to int explicit to silence compiler
warnings about them. The casts are required during the computation of
exponentiation.
Co-authored-by: Sven Linker <sven.linker@kernkonzept.com>
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
Diffstat (limited to 'libm/s_expm1.c')
-rw-r--r-- | libm/s_expm1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libm/s_expm1.c b/libm/s_expm1.c index 8e51ae748..85defefa4 100644 --- a/libm/s_expm1.c +++ b/libm/s_expm1.c @@ -159,7 +159,7 @@ double expm1(double x) else {hi = x + ln2_hi; lo = -ln2_lo; k = -1;} } else { - k = invln2*x+((xsb==0)?0.5:-0.5); + k = (int32_t)(invln2*x+((xsb==0)?0.5:-0.5)); t = k; hi = x - t*ln2_hi; /* t*ln2_hi is exact here */ lo = t*ln2_lo; |