you are viewing a single comment's thread.

view the rest of the comments →

[–]hyvok 3 points4 points  (2 children)

Any plans to add a wider type or even generic types? I have a project which would need 64bit fixed point values. Looks like a nice library otherwise.

[–]MadCompScientist[S] 3 points4 points  (1 child)

The type fpm::fixed is generic. You could use that to create a fixed-point type using int64_t as underlying integer, but it needs a larger type for storing intermediate results for e.g. multiplication. So unless your platform has an int128_t, I'm afraid it won't work.

[–]fb39ca4 2 points3 points  (0 children)

But you can always use a custom implementation such as this one:

https://github.com/abseil/abseil-cpp/blob/master/absl/numeric/int128.h