Bug 287086 - Scientific Notation conversion to decimal for negative numbers does not display decimal
Summary: Scientific Notation conversion to decimal for negative numbers does not displ...
Status: RESOLVED FIXED
Alias: None
Product: kcalc
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Evan Teran
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-20 18:13 UTC by David Charles Pyle
Modified: 2024-09-07 23:11 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Charles Pyle 2011-11-20 18:13:54 UTC
Version:           unspecified (using KDE 4.7.3) 
OS:                Linux

I am actually using version 2.9 of KCalc. I try to convert a number in scientific notation to decimal equivalent using a negative exponent and do not get the decimal. Other calculators work and KCalc also does work when doing so with positive exponents.

Reproducible: Always

Steps to Reproduce:
1. Click or type 1.7.
2. Click or hit shortcut key for exponent (x.10y).
3. Click or hit shortcut key for equal.

Actual Results:  
For example, typing 1.7 X 10^-5 in shows 1.7e-5, and hitting the equal key should show 0.000017 but instead shows 1.7e-05.

I could just take the time to move the decimal point to the left five places and add zeroes to figure out what the calculator is telling me but I should not have to do so when other calculator software does not require taking this extra step, especially when I or anyone else is in a hurry doing calculations for whatever purpose.

I have tried a number of other examples and get the same. None have displayed as decimal. It works fine with positive numbers, however.

Expected Results:  
Hitting the equal key should show 0.000017 but instead shows 1.7e-05.

OS: Linux (x86_64) release 3.1.0-7.fc16.x86_64
Compiler: gcc
Comment 1 Christoph Feck 2011-11-20 23:09:25 UTC
It works like a regular scientific calculator. The more "0" digits are shown to the left of the decimal separator, the less significant digits are visible,  in other words, the less precise is the result. Actually, if you enter "0.0001" vs. "0.00001", you will see that automatically converts to scientific notation starting at the exponent of -5.

To me it looks like a WONTFIX, but maintainer decides.
Comment 2 David Charles Pyle 2011-11-21 00:04:10 UTC
(In reply to comment #1)
> It works like a regular scientific calculator. The more "0" digits are shown to
> the left of the decimal separator, the less significant digits are visible,  in
> other words, the less precise is the result. Actually, if you enter "0.0001"
> vs. "0.00001", you will see that automatically converts to scientific notation
> starting at the exponent of -5.
> 
> To me it looks like a WONTFIX, but maintainer decides.

It looks like you are correct about conversion being at exponents of -5 or smaller. I guess I could just do it in my head then, or use paper in multi-calculative, lazy moments. :)

But I was in a hurry and having to do it manually was a pain, so I switched calculators. But, then I ran into a problem with Gnome 3.2.1's calculator for other calculations and had to go to yet another. That one was the fixed limitation of 9 decimal places when I needed to know the full spectrum of significant and least significant numbers. (I was calculating radiation figures and kind of need at least fairly good accuracy for that). But, I digress.

I hope that this isn't a WONTFIX but I suppose I will have to deal with it, if so. It was just an inconvenience but I at this point get no application crashes from it, like earlier versions of this program did.
Comment 3 Evan Teran 2012-04-04 20:32:36 UTC
I guess I could look into creating a patch which if reasonable will format numbers in decimal instead of scientific notation. I suppose kinda similar to printf's %g.
Comment 4 Justin Zobel 2020-11-25 03:41:38 UTC
Resetting to default assignee.
Comment 5 Gabriel Barrantes 2024-09-07 23:11:59 UTC
Since the input display was added this is not applicable.