Mike Lankamp
Mike Lankamp
I've noticed that issue as well. I think the `is_integral` assertion also fails for boost::multiprecision. Edit: I see you're asking about IntermediateType, not BaseType. Yes, then the `is_signed` check is...
Hi @Eren121, it is the same in practice, but to be fair, FPM makes no guarantee for this. You could use `raw_value()` for now, but "officially" supporting platform-stable (and backwards-compatible)...
Hi @flaviut, thanks for your PR. I wasn't aware of PlatformIO as package/library manager but I looked it up and this looks ok in principle. The only issue I have...
Currently, `fpm::fixed` requires its templated types to be integrals (via a `std::is_integral` check). Indeed it would be nice to support integral-_like_ types like `boost::multiprecision::cpp_int`. I'm not sure yet how to...
Hi @Klummel69. I can see the value in supporting those platforms. I'd indeed prefer one of the "bit hack" solutions over the naive loop, but I'd rather avoid adding preprocessor...
Built-in `clz` is already used (see `include/fpm/math.hpp`) Support for native fixed-point operations is interesting. Preferably the compiler figures it out and the library doesn't need to do anything. Otherwise, some...
Hi Mathieu, Thanks for the feedback! Looks like you've added some casts (the casting-to-types got lost I'm afraid, you may want to edit your text and use a codeblock), but...
I know some other fixed-point libraries have overflow detection, but one of the concerns I have with this is performance: adding these checks slows down basic fast operations like addition...
> possibility to detect overflows at least during development. Another option is to use `assert`, but then this is only checked in debug builds. Backward compatibility wouldn't be a concern,...
An interesting idea, @pavel-kirienko. This was considered for #8, but I was afraid I couldn't guarantee that the user wouldn't use weird types such as float or classes. As mentioned...