Opened 11 years ago
Closed 11 years ago
#2431 closed defect (fixed)
"global precision value" issues
Reported by: | anonymous | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.1 |
Component: | OMEdit | Version: | trunk |
Keywords: | Cc: |
Description
I intend the parameter "Global precision value" in OMEdit/options as an indication on how real numbers are displayed in program's windows by default.
Internal representation of numbers should not be affected.
*
However if the global precision value is changed from 6 to 5 any new model will receive a default tolerance of 0.000, and will not simulate (up to when the user realizes this and changes the tolerance.)
*
I propose to change the global precision value management. I propose three options, all of which improve today's behavior significantly. The choice between them depend on the programmer's opinions.
OPTION A: precision is intended as it is now in OMEdit. Modifications to implement:
1) global precision value should be only a display parameter and should not affect internal representation of numbers
2) whenever the default from the options panel is not appropriate it should not be used. If the global precision value is is than 6 tolerance should be displayed in exponential form.
OPTION B Precision is intended as a number of significant digits, not digits after comma
In this case, for instance for precision=5, valid numbers are:
123,45 12,345 1,2345 0,12345
These all share the same number of significant digits, but different numbers of digits after comma.
OPTION C The global precision value is removed from OMEdit options.
The program would therefore show numbers, as default representation, in the most suitable format for any of them. However, when the user writes in another forms, the user representations is to be retained.
According to this, for instance, as default start and stop times could be 0.0 and 1.0, but the user might want to use as stop time 0.085 or 85e-3 (85 ms) and the program should keep the user formatting.
Integer numbers must be shown as integer (now number of intervals is shown in floating point format).
I prefer OPTION C.
Change History (2)
comment:1 by , 11 years ago
Component: | Backend → OMEdit |
---|---|
Owner: | changed from | to
Priority: | high → normal |
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in r17875.
The global precision value setting is removed & tolerance is changed to text box (now one can also specify scientific notation like 1e-6). It was not possible to use the QDoubleSpinBox with unlimited precision value and as a result changes the internal representation of the value.