Default shortcut for '^' not intuitive?

Bug #16505 reported by Jeff Hodges
14
Affects Status Importance Assigned to Milestone
gcalctool (Ubuntu)
Fix Released
Low
Sebastien Bacher

Bug Description

This bug may be needed to be moved upstream. When a user enters a statement
with exponentiation using the keyboard, instead of seeing the proper "^" in the
statement, they will have entered in "XOr". Example: "5^2" entered with the
keyboard will become (and be calculated as) "5 XOr 2". I'm not so sure that
many developers find this handy and for myself and the average user, "^" should
be exponentiation, not an exclusive or. There seems to be no other sane keycode
for entering in exponentiation from the keyboard. Even "**" tosses up a
malformed statement error. This interpretation of the "^" keycode needs to be
changed into the nicely sane default of exponentiation.

[In case someone goes crazy: "**" should not be used as the new keycode for
exponentiation for a variety of reasons; the most basic of these is that "**"
does not exist as an operator for most users and mathematicians (unless they
happen to be doing some numerical analysis).]

http://bugzilla.gnome.org/show_bug.cgi?id=304056: http://bugzilla.gnome.org/show_bug.cgi?id=304056

Revision history for this message
Jeff Hodges (jmhodges) wrote :

*** Bug 16504 has been marked as a duplicate of this bug. ***

Revision history for this message
Matt Zimmerman (mdz) wrote :

The default shortcut for exponentiation is 'y' (as in 'x^y')

Revision history for this message
Jeff Hodges (jmhodges) wrote :

Created an attachment (id=2205)
'^' -> calc_xpowy() and 'x' -> calc_xor()

(In reply to comment #2)
> The default shortcut for exponentiation is 'y' (as in 'x^y')

Ah, there we go. It seems that this is a simple three line patch to
lr_parser.y. I ran the old "ask 10 people" usability test on what button
people use when they plug expressions into their software calculators and it's
either "I use a mouse" or "I hit that carrot/hat/up arrow button". Maybe it's
a cultural thing but so far, no one has thought that "y" would be something
they would try. I'm including a patch to switch '^' to calc_xpowy() and 'x' to
calc_xor(). I've triple checked to make sure this doesn't break anything in
the parser. Feeling silly for making a new patch (and a new comment) for three
lines of work on such a trivial change. The patch is against the latest CVS
but I doubt the parser has changed much.

Revision history for this message
Sebastien Bacher (seb128) wrote :

I've opened a bug upstream about this:
http://bugzilla.gnome.org/show_bug.cgi?id=304056

Revision history for this message
Sebastien Bacher (seb128) wrote :

This bug is fixed by this upload:

 gcalctool (5.6.14-0ubuntu1) breezy; urgency=low
 .
   * Sync with Debian.
   * New upstream version:
     - fix the exponential function (Ubuntu: #8366).
     - fix the keyboard shortcut for x^y (Ubuntu: #10207).
   * debian/watch:
     - updated.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.