GNOME Bugzilla – Bug 336609
Implement Logarithm with base X
Last modified: 2009-09-28 02:46:01 UTC
ATM, there are only two logarithms available : LN and Log 10. It could be useful to have Log X, just like we already have : e^X, 10^X *AND* X^Y For example, try to compute your bugzilla karma with gcalctool ;-)
Nice idea. Furturing it for now as I have other higher priorities. Of course, if you supplied a patch to implement this... ;-)
Now that we've got a "gcalctool-maint@gnome.bugs" alias, I'm reassigning several bugs and enhancement back to that. They are free to be picked up by one of the team and worked on.
Bug #505892 will implement a log2 function (that should be included for GNOME 2.22). As comment #4 of that bug also mentions, we can improve this in a similar way to what you suggest, for GNOME 2.23/24.
Created attachment 130079 [details] [review] Fix suggestion This patch implements logarithm with base x. It does so by converting Log from a function to an infix operator - it was the only syntax that made obvious sense to me for LogX, and doing the same change for Log2 and Log10 improves consistency, and makes it easier to write the parser. For consistency reasons I also did the same thing to Ln. I'm unsure about what to do with x^y, since that logically should be the inversion for y logx, but that would mean that x^(1/y) would be alone on one button, which would look weird.
Fixed in the 5.29 UI where you can use subscript numbers to do this, e.g. "log₂1024"