fpm::isnormal has a different behaviour than std::isnormal
davidgutierrezpalma opened this issue · 1 comments
davidgutierrezpalma commented
The fpm::isnormal function returns true for every fixed point number, but the equivalent STL function returns false for std::isnormal(0.0).
https://www.cplusplus.com/reference/cmath/isnormal/
My proposed solution would be:
template <typename B, typename I, unsigned int F>
constexpr inline bool isnormal(fixed<B, I, F>) noexcept
{
return x.raw_value() != B{0};
}
MikeLankamp commented
Hi @davidgutierrezpalma, you're right, I missed that part of the specification. Thanks for reporting it!