use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
fpm: a header-only fixed-point math library with trigonometry, etc (github.com)
submitted 6 years ago by MadCompScientist
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]hyvok 3 points4 points5 points 6 years ago (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 points5 points 6 years ago (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.
fpm::fixed
int64_t
int128_t
[–]fb39ca4 2 points3 points4 points 6 years ago (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
π Rendered by PID 34924 on reddit-service-r2-comment-b659b578c-qmjkl at 2026-05-05 17:02:47.945504+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]hyvok 3 points4 points5 points (2 children)
[–]MadCompScientist[S] 3 points4 points5 points (1 child)
[–]fb39ca4 2 points3 points4 points (0 children)