roystgnr / MetaPhysicL

Metaprogramming and operator-overloaded classes for numerical simulations
Other
22 stars 12 forks source link

Need std::cbrt for dual numbers (C++11) #36

Closed dschwen closed 5 years ago

dschwen commented 5 years ago

std::cbrt(x) is faster and more mnemonic than std::pow(x, 1.0/3.0). Would be nice to have support for it in MetaPhysicL

roystgnr commented 5 years ago

There's a whole swath of useful functions that C++11 added and we ought to too, isn't there?

https://en.cppreference.com/w/cpp/numeric/math

There's also a whole swath of pointless alternative names that C++11 added, I guess for easier transitioning from C99, which we should add too for maximum compatibility with preexisting code.

roystgnr commented 5 years ago

I'm kind of tempted to procrastinate on anything like remquo that has a call signature too weird to fit into our existing macros, though, at least until we encounter an actual user who wants it.

roystgnr commented 5 years ago

Closed by #39