Bug 88497 - inconsistant numbering (scientific notation) in status bar
Summary: inconsistant numbering (scientific notation) in status bar
Status: RESOLVED WORKSFORME
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: RedHat Enterprise Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-31 05:42 UTC by Matthew Truch
Modified: 2004-09-01 23:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Truch 2004-08-31 05:42:07 UTC
Version:           1.0.0_devel (using KDE KDE 3.2.2)
Installed from:    RedHat RPMs
OS:                Linux

The cursor position (or actual vector values when in datamode) are displayed in the statusbar at the bottom of a kst window.  Sometimes normal notation and scientific notation are mixed in a strange way.  For example:  If the value of exactly 100 appears, it will display that as '1E+02', but as you move the cursor up it reads '101', '102', '103', etc., and down it reads '99', '98', '97'.  Logically you would expect it to read '100'.  I imagine this also happens at 1000, but I have not tried it.  

Expected behavior: It only switches to scientific notation when it 'makes sense to do so, ie for large and small values', and does not switch between the two needlessly or at intermediate values.
Comment 1 Andrew Walker 2004-08-31 19:12:22 UTC
The cursor position is displayed using the 'G' format specifier which means it will use the shorter of the 'E' (1E+02) and 'f' (100) formats. For the situation described it should display 100 (as this is shorter than 1E+02). This is what I see when I reproduce the scenario described above.

That said the 'G' format specifier was missing from the code in some places, and the default is 'g' (2E+04 instead of 2e+04).
Comment 2 Andrew Walker 2004-08-31 19:16:12 UTC
Could you add more details so we can try and better reproduce the described problem. It is possible that round off error or something else is causing what you are seeing, but we would need more information to reproduce it.
Comment 3 Matthew Truch 2004-09-01 23:37:56 UTC
On Tue, Aug 31, 2004 at 05:16:12PM -0000, Andrew Walker wrote:
> Could you add more details so we can try and better reproduce the
> described problem. It is possible that round off error or something
> else is causing what you are seeing, but we would need more
> information to reproduce it.

I have not been able to reproduce it since.  It probably was a weird
roundoff issue.  If I can reproduce it, I'll reopen.  

Comment 4 Matthew Truch 2004-09-01 23:38:42 UTC
Ooops, actually close the bug.