gcalctool does implicit multiplication for e (Exp), even if it stands for 2.718

Bug #495551 reported by Oliver Joos
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcalctool (Ubuntu)
Fix Released
Low
Robert Ancell
Karmic
Fix Released
Undecided
Unassigned
Lucid
Fix Released
Low
Robert Ancell

Bug Description

Binary package hint: gcalctool

I stumbled upon https://bugs.launchpad.net/bugs/483730 and like to add that implicit multiplication looks confusing if e stands for 2.718:
1e+1 == 10 is correct,
1*e+1 == 3.718 is correct and clear, but
1e*1 == 2.718 should better be an invalid expression

Not convinced? The current gcalctool says:
1e+1e == 27.182818285 != 2e this is definitely not obvious

To keep it simple and straightforward, I propose:
if e is immediately after a digit, it stands for *10^, otherwise for 2.718, never for *2.718.
(This is about what the python interpreter does)

ProblemType: Bug
Architecture: i386
Date: Fri Dec 11 17:43:40 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/gcalctool
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
Package: gcalctool 5.28.1-0ubuntu1
ProcEnviron:
 PATH=(custom, user)
 LANG=de_CH.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-16.53-generic
SourcePackage: gcalctool
Uname: Linux 2.6.31-16-generic i686
XsessionErrors:
 (gnome-settings-daemon:12143): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (polkit-gnome-authentication-agent-1:12185): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (nautilus:12178): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (gnome-panel:12174): Gdk-WARNING **: /build/buildd/gtk+2.0-2.18.3/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window
 (gnome-panel:12174): Gdk-CRITICAL **: gdk_x11_colormap_foreign_new: assertion `GDK_IS_VISUAL (visual)' failed

Revision history for this message
Oliver Joos (oliver-joos) wrote :
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Agreed. I've already removed the 'e' notation from 5.29 as is too confusing (especially when including hexadecimal numbers)
http://git.gnome.org/cgit/gcalctool/commit/?h=gnome-2-28&id=9b7efd798f226ce4f1a86162112f09d7c42783e2

Changed in gcalctool (Ubuntu):
importance: Undecided → Low
status: New → Fix Committed
Revision history for this message
Oliver Joos (oliver-joos) wrote :

Thank you for the quick fix!
I rebuilt the latest source from git and confirm that this bug is fixed.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted gcalctool into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in gcalctool (Ubuntu Karmic):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Mitch Towner (kermiac) wrote :

apt-cache policy gcalctool
gcalctool:
  Installed: 5.28.1-0ubuntu1
  Candidate: 5.28.1-0ubuntu1
  Version table:
 *** 5.28.1-0ubuntu1 0
        500 http://mirror.optus.net karmic/main Packages
        100 /var/lib/dpkg/status

Bug confirmed.
Performed test case as follows:
1e+1 == 10
1*e+1 == 3.718
1e*1 == 2.718

Updated from karmic-proposed
apt-cache policy gcalctool
gcalctool:
  Installed: 5.28.2-0ubuntu1
  Candidate: 5.28.2-0ubuntu1
  Version table:
 *** 5.28.2-0ubuntu1 0
        100 /var/lib/dpkg/status
     5.28.1-0ubuntu1 0
        500 http://mirror.optus.net karmic/main Packages

SRU verified as fixed.
Performed test case as follows:
1e+1 == 10
1*e+1 == 3.718
1e*1 == "Malformed expression"

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcalctool - 5.28.2-0ubuntu1

---------------
gcalctool (5.28.2-0ubuntu1) karmic-proposed; urgency=low

  * New upstream release:
    - Fix negative exponential detection e.g. "2e−3" = 0.002 (LP: #483730)
    - Only disable trailing zeroes option in basic mode (LP: #484306)
    - Disable ambiguous multiplication with Eulers number, e.g. "2e" as this
      makes exponential numbers confusing (LP: #495551)
 -- Robert Ancell <email address hidden> Fri, 18 Dec 2009 09:58:51 +1100

Changed in gcalctool (Ubuntu Karmic):
status: Fix Committed → Fix Released
Martin Pitt (pitti)
Changed in gcalctool (Ubuntu Lucid):
assignee: nobody → Robert Ancell (robert-ancell)
Revision history for this message
Sebastien Bacher (seb128) wrote :

the issue is fixed in lucid

Changed in gcalctool (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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