bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stats_char_mean(): char signedness is inconsistent in different architec


From: Alejandro Colomar (man-pages)
Subject: stats_char_mean(): char signedness is inconsistent in different architectures
Date: Sat, 19 Jun 2021 01:20:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

Hi,

Could you please provide a function that acts on int8_t aka signed char?
Right now, you provide stats_uchar_mean(), which acts on unsigned chars (uint8_t), and stats_char_mean(), which acts on char(), and depending on the architecture, it can be signed or unsigned, but considering that it receives a pointer, even if it were signed, an assignment from int8_t would require a cast.

I think you should provide functions for fixed width types, but at least you could provide functions for signed chars.

Plain char should only be used for text.

Thanks,

Alex


--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]