Closed davidgutierrezpalma closed 3 years ago
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}; }
Hi @davidgutierrezpalma, you're right, I missed that part of the specification. Thanks for reporting it!
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: