OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000043OMNeT++simulation kernelpublic2009-01-13 13:402010-04-23 18:49
Assigned Toandras 
PlatformOSOS Version
Product Version4.0rc1 
Target VersionFixed in Version4.1 
Summary0000043: truncnormal() sometimes returns INFINITY
Descriptiontruncnormal() sometimes returns infinity

With a propability of 2^32 genk_dblrand(rng) returns 0. In this case normal() returns infinity (log(0)).

This probably effects other distribution functions with use log() as well.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
stkrause (reporter)
2009-08-27 13:00

This bug still affects the current release. It does not only affect truncnormal(), but all other functions that call log(genk_dblrand()).

Additionally, (trunc)normal can return NaN if it is called with a deviation parameter of 0.

This can really break results in a simulation in unpredictable ways.

A possible fix would be to create a gend_dblrand_nonzero() (the random number generators already support this, it is just not easily accessible from outside) and use it instead of genk_dblrand in those functions.
rhornig (administrator)
2009-11-09 18:38

A similar issue is occurring with the exponential distribution returning INF if the provided argument is 0 or very small. Generally we should not return INF.
the call that led to a Inf value was actually exponential(1/(1770E6))
andras (administrator)
2010-04-23 18:49

Affected distributions: normal(), truncnormal(), exponential(), geometric().

Actually, internally we should have used uniform variables on (0,1] not [0,1). Resolved by replacing dblrand() with 1.0-dblrand().

Other distributions containing log() seem to be correct (already contain 1-U).

This fix will change simulation fingerprints!

- Issue History
Date Modified Username Field Change
2009-01-13 13:40 baumgart New Issue
2009-01-13 13:40 baumgart Assigned To => andras
2009-08-27 13:00 stkrause Note Added: 0000167
2009-11-09 18:38 rhornig Note Added: 0000193
2009-11-09 18:38 rhornig Priority normal => high
2010-04-23 18:49 andras Note Added: 0000243
2010-04-23 18:49 andras Status new => resolved
2010-04-23 18:49 andras Fixed in Version => 4.1
2010-04-23 18:49 andras Resolution open => fixed

Copyright © 2000 - 2022 MantisBT Team
Powered by Mantis Bugtracker