Add casts where necessary to convince clang that the promotion of float
to double is intentional.
Signed-off-by: Sven Linker <sven.linker(a)kernkonzept.com>
---
libm/cexp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libm/cexp.c b/libm/cexp.c
index 87512b7c5..a08d12d4e 100644
--- a/libm/cexp.c
+++ b/libm/cexp.c
@@ -38,10 +38,10 @@ libm_hidden_proto(cexpf)
__complex__ float cexpf(__complex__ float z)
{
__complex__ float ret;
- double r_exponent = exp(__real__ z);
+ double r_exponent = exp((double)__real__ z);
- __real__ ret = r_exponent * cosf(__imag__ z);
- __imag__ ret = r_exponent * sinf(__imag__ z);
+ __real__ ret = r_exponent * (double) cosf(__imag__ z);
+ __imag__ ret = r_exponent * (double) sinf(__imag__ z);
return ret;
}
--
2.43.0