View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003484 | JEDI VCL | 00 JVCL Components | public | 2006-02-01 00:00 | 2008-02-21 03:19 |
| Reporter | BrunoT | Assigned To | |||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | suspended | ||
| Product Version | 3.10 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0003484: JvValidateEdit interprets very large & very small values incorrectly | ||||
| Description | A very little difference was returned from a operation //eg. 183,03-Round(183,03*100)/100 // 2.842170943e-14 JvValidateedit.Value interprets it as "2.84" | ||||
| Additional Information | DecimalPlaces = 2 Displayformat = dfFloat | ||||
| Tags | No tags attached. | ||||
| has duplicate | 0003768 | closed | Scientific value |
|
2006-02-01 00:00
|
|
|
|
SysUtils.FloatToStr returns a string containing an 'E' for very large or very small values. When (DisplayFormat = dfFloat) TJvCustomValidateEdit.MakeValid strips the 'E-' out of the string. This issue affects [dfFloat, dfCurrency, dfPercent]. Use DisplayFormat = dfScientific to display these values correctly. Off Topic: There may be a bug in your code...in the following snippet, I assume that "," is your locale equivalent of "." //eg. 183,03-Round(183,03*100)/100 // 183.03 * 100 = 18303 Round(18303) = 18303 18303 / 100 = 183.03 183.03 - 183.03 = 0 The result of that expression would be zero, not 2.842170943e-14 |
|
|
This Part was different to version 3.00, isn´t it? This: //eg. 183,03-Round(183,03*100)/100 // was an incomplete code- part.;) I truncat the numbers after two decimals befor I send it to JvValidateEdit.Value. Thanks for the fast answer. |
|
|
elahn, any opinion on the actions to take here? |
|
|
I've just fixed (in CVS) the issue for small values, but I don't know what to do about large ones. Once the number of digits to the left of the decimal point is greater than 18, it gets displayed in scientific format & thus mishandled. Also, some strange things happen at 17 and 18 digits, e.g. "12,345,678,901,234,567" gets replaced with "12,345,678,901,234,568" if (DecimalPlaces = 0), but if (DecimalPlaces = 10) then it gets replaced with "12,345,678,901,234,566". |
|
|
Any news on this? |
|
|
Nope. |
|
|
This issue is too old, many changes have been done in between. Should this still be applicable, please create a new issue after having tested using the latest JVCL |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2006-02-01 00:00 | BrunoT | New Issue | |
| 2006-02-01 00:00 | BrunoT | File Added: JvValidateEdit_bug.jpg | |
| 2006-02-02 02:02 | elahn | Note Added: 0008489 | |
| 2006-02-02 02:02 | elahn | Status | new => confirmed |
| 2006-02-02 02:04 | elahn | Summary | JvValidateEdit interprets a false Value => JvValidateEdit interprets very large & very small values incorrectly |
| 2006-02-02 02:04 | elahn | Description Updated | |
| 2006-02-02 02:39 | BrunoT | Note Added: 0008490 | |
| 2006-04-05 05:19 | obones | Note Added: 0008957 | |
| 2006-04-05 05:19 | obones | Status | confirmed => feedback |
| 2006-04-05 07:19 | elahn | Note Added: 0008994 | |
| 2006-04-12 01:06 | obones | Status | feedback => confirmed |
| 2006-06-08 02:02 | obones | Note Added: 0009417 | |
| 2006-06-08 10:03 | elahn | Note Added: 0009498 | |
| 2006-06-20 01:05 | obones | Relationship added | has duplicate 0003768 |
| 2008-02-21 03:17 | obones | Status | confirmed => closed |
| 2008-02-21 03:17 | obones | Note Added: 0014207 | |
| 2008-02-21 03:19 | obones | Resolution | open => suspended |