On 24/05 17.54, Pekka Nousiainen wrote:
> === modified file 'storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp'
> --- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp 2011-05-24 14:26:59 +0000
> +++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp 2011-05-24 17:54:07 +0000
> @@ -203,7 +203,7 @@ Dbtux::getPathToNode(NodeHandle node, Ui
> static double
> tux_log2(double x)
> - return ::log(x) / ::log(2);
> + return ::log(x) / ::log((double)2.0);
Just a comment from the sidelines, I have no idea what this is used
for or how often. It just seems like a waste to recalculate log(2.0)
every time, why not store it in a constant?
If this isn't used very fequently I guess it doesn't matter and the
code is of course clearer this way.
- Bjorn (just browsing the commit list....)