Anonymous | Login | 2022-06-26 02:38 UTC | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0001038 | OMNeT++ | simulation kernel | public | 2018-05-15 13:29 | 2018-06-19 16:59 | ||||
Reporter | levy | ||||||||
Assigned To | andras | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | 5.3 | ||||||||
Target Version | Fixed in Version | 5.4 | |||||||
Summary | 0001038: SimTime::operator/ may lose precision unnecessarily | ||||||||
Description | The SimTime::operator/ often converts the simulation time to double and calculate with the double instead. This often leads to unnecessary precision loss in the result. In such cases, the calculation could be done without precision loss (e.g. 12 / SimTime(0.3) -> exact 40, or SimTime(0.00012) / SimTime(0.0003) -> exact 4) Maybe the best would be to introduce a new division operation into SimTime and use that where precision loss is unacceptable (e.g. Ieee80211ModeSet). It would give a hint for the future maintainers not to "fix the code". | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
![]() |
|
(0001361) andras (administrator) 2018-06-19 16:59 |
Division is done using integer arithmetic as long as possible, and only falls back to floating-point division if necessary. |
![]() |
|||
Date Modified | Username | Field | Change |
2018-05-15 13:29 | levy | New Issue | |
2018-06-19 16:57 | andras | Status | new => closed |
2018-06-19 16:57 | andras | Assigned To | => andras |
2018-06-19 16:57 | andras | Resolution | open => fixed |
2018-06-19 16:57 | andras | Fixed in Version | => 5.4 |
2018-06-19 16:59 | andras | Note Added: 0001361 |
Copyright © 2000 - 2022 MantisBT Team |