Re: [Mingw-w64-public] [PATCH] for sinhl()
On Sun, 21 Aug 2016, David Wohlferd wrote: > In this function: > >long double sinhl(long double x) > > there is a call to fabs: > > (fabs (x) > (MAXLOGL + LOGE2L))) > > However, fabs doesn't take a (long double), it only takes a (double). Clang > complains about the truncation (warning: absolute value function 'fabs' given > an argument of type 'long double' but has parameter of type 'double' which > may cause truncation of value). > > Patch attached. Ok with me. // Martin -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] [PATCH] for sinhl()
In this function: long double sinhl(long double x) there is a call to fabs: (fabs (x) > (MAXLOGL + LOGE2L))) However, fabs doesn't take a (long double), it only takes a (double). Clang complains about the truncation (warning: absolute value function 'fabs' given an argument of type 'long double' but has parameter of type 'double' which may cause truncation of value). Patch attached. dw diff --git a/mingw-w64-crt/math/sinhl.c b/mingw-w64-crt/math/sinhl.c index f6ecef0..4db0e51 100644 --- a/mingw-w64-crt/math/sinhl.c +++ b/mingw-w64-crt/math/sinhl.c @@ -67,7 +67,7 @@ long double sinhl(long double x) if (x_class == FP_ZERO) return x; if (x_class == FP_INFINITE || - (fabs (x) > (MAXLOGL + LOGE2L))) + (fabsl (x) > (MAXLOGL + LOGE2L))) { errno = ERANGE; #ifdef INFINITIES -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public