cpp_weekly
cpp_weekly copied to clipboard
constexpr math functions
https://github.com/kthohr/gcem
Note: this is available on compiler-explorer too
- It's C++11 - so lots of recursion
- If you were making a C++20 fork of it, you'd probably want make these consteval to force compile time evaluation?
It might also be interesting to mention
https://en.cppreference.com/w/cpp/numeric/constants
When people say C++ is going too fast, just remember, they took 40 years to add e, π.
Coming in Ep449