OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001038OMNeT++simulation kernelpublic2018-05-15 13:292018-06-19 16:59
Reporterlevy 
Assigned Toandras 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version5.3 
Target VersionFixed in Version5.4 
Summary0001038: SimTime::operator/ may lose precision unnecessarily
DescriptionThe 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".
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(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.

- Issue History
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 - 2018 MantisBT Team
Powered by Mantis Bugtracker