After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 336609 - Implement Logarithm with base X
Implement Logarithm with base X
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
unspecified
Other All
: Normal enhancement
: 2.30.0
Assigned To: gcalctool maintainers
gcalctool maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-30 12:34 UTC by Lionel Dricot
Modified: 2009-09-28 02:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix suggestion (8.54 KB, patch)
2009-03-04 23:48 UTC, Robin Sonefors (ozamosi)
none Details | Review

Description Lionel Dricot 2006-03-30 12:34:42 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 ;-)
Comment 1 Rich Burridge 2006-09-10 16:19:18 UTC
Nice idea. Furturing it for now as I have other higher
priorities. Of course, if you supplied a patch to 
implement this... ;-)
Comment 2 Rich Burridge 2007-11-03 15:31:27 UTC
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.
Comment 3 Rich Burridge 2007-12-29 03:55:49 UTC
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.
Comment 4 Robin Sonefors (ozamosi) 2009-03-04 23:48:01 UTC
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.
Comment 5 Robert Ancell 2009-09-28 02:46:01 UTC
Fixed in the 5.29 UI where you can use subscript numbers to do this, e.g. "log₂1024"