cpp_weekly icon indicating copy to clipboard operation
cpp_weekly copied to clipboard

constexpr math functions

Open lefticus opened this issue 1 year ago • 1 comments

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?

lefticus avatar Aug 04 '24 00:08 lefticus

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, π.

fcolecumberri avatar Aug 04 '24 09:08 fcolecumberri

Coming in Ep449

lefticus avatar Aug 28 '24 00:08 lefticus