-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a set of constexpr math functions #679
Comments
Exactly, that's what remains to be done before we are able to perform complex SE(2) / SE(3) operations at compile time... 👍 Though, I can only think of look-up-tables as a way to evaluate sin/cos as constexpr... Let's wait some time just in case we find a better solution. |
Looks like builtins like __builtin_sinf can be constexpr in gcc. Not in clang. Not sure about msvc. |
An alternative to a lookup table is the taylor series: |
Here's the glibc builtin implementation |
Looks like the C++ committee wants to eventually turn almost everything constexpr-capable, so that's good news! But also probably means any attempt on our side will eventually become obsolete... e.g. our current constexpr string... |
For example,
::cos
is not a constexpr.I think this can be useful for constexpr pose composition.
The text was updated successfully, but these errors were encountered: