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 147803 - Calculator should allow setting of precision
Calculator should allow setting of precision
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Rich Burridge
Rich Burridge
Depends on:
Blocks:
 
 
Reported: 2004-07-18 03:26 UTC by gnome_bugs
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6



Description gnome_bugs 2004-07-18 03:26:09 UTC
I was reading an article which mentioned an interesting decimal expansion of the
inverse of 243, and I attempted to repeat this in the Gnome Calculator.  Even in
Scientific mode, the calculator shows only nine digits of precision.

This would not be a big deal if Linux already had a ubiquitous way of
calculating specified precision, but neither `bc' nor `dc' offer it.

So, my suggestion: add a preference for arbitrary (or a decent amount of) precision!
Comment 1 Rich Burridge 2004-09-03 17:12:25 UTC
Yup. This has been in the TODO file since about 1992. Finding an easy
way to expose this without confusing novice users is the hard part. The
coding part is relatively easy, and with the horizontal scrollbar in
v5.5.X of gcalctool, should be simply to display too.

Adding Calum, my HCI person for his thoughts on the best place to hook 
this up.
Comment 2 Rich Burridge 2004-09-16 22:31:24 UTC
I've checked into CVS HEAD changes that will now do this.

There is a new menu item under the Acc menu in Scientific mode
called "Set Precision..." that will allow you to set the
number of significant places from anywhere between 0 and MAXACC.
I've currently set MAXACC to 30.

I've left this enhancement request open for now. I'm not too
happy with the way the UI now looks, and want to get Calum to
give it a going over.

The main problem is the Acc menu now looks wrong if the accuracy
is set to something other than 0-9 places. Those first ten entries
in the menu are radio-box entries, so if they is an accuracy value
outside that range, then the "0 significant places" menu item remains
checked. Ugh!

Perhaps it's time to just remove the Acc menu, and add a "Set Precision..."
item somewhere in the menubar. The remaining menu item in the Acc menu
("Show Trailing Zeroes...") also appears in the View menu in the menu bar as well.

Perhaps the Acc menu should just now contain two items:

  Set Precision...
  ------------------
  Show Trailing Zeroes

An alternative would be to just change the first ten menu items 
to not be a radio-box group, and then only check them if the 
accuracy is in the range 0-9.

No matter what way you look at it, if the accuracy is now > 9,
the user has no idea what it's currently set to , unless they go
to changes it with Acc->Set Precision... Perhaps this needs to be
displayed somewhere.

In short, this UI needs to be fixed.

Calum, do your stuff!

Thanks.

currently appears
Comment 3 Rich Burridge 2004-09-17 16:41:22 UTC
After discussing this with Calum, then plan is to make the 
following adjustments:

  - "Significant places" not "Significant Places".
  - Change "Set Precision..." to be "Other (12) ..." (where "(12)" is
    the current precision, and be in the same radio box group as 
    the other menu items. Check the appropriate menu entry
  - Adjust the Acc button tooltip to show the current accuracy too.
  - When the user enters an invalid entry in the Set Precision popup,
    show an error message in the main gcalctool status bar
  - the other Acc radio button items (0-9) need to have mnemonics (_0,
    _1 ...).

I'm working on fixing these up now.
Comment 4 Rich Burridge 2004-09-17 20:39:47 UTC
These changes have now been checked into CVS HEAD.
I've updated the version number in configure.in to
5.5.4 (but haven't generated a new gcalctool tarball 
at this time as we want to fix a couple more things).