Join GitHub today
Add log function for templates #3662
Hence I would prefer to name the template function
Let's take this a step further. log_e might be limiting in some cases and log_10 might be needed instead. While the
Hence I suggest the addition (or even as a replacement) of a more generic logarithm template func where users can set the base as a parameter. The
But it's trivial to obtain the result in the wished by with log_10. Let's say I want to calculate log_2(8). This can be written as log_10(8) / log_10(2).
So implementing a generic function should be trivial.
Also, I don't like
If we put these in the global funcmap, I say we simply use the same names:
Creating a single, multipurpose
Hence the generic func which is neither difficult to use nor to implement.