[Ns-bugs] [Bug 181] Normal Variable Infinite Value & Bounds
bugzilla-daemon@nsnam-www.ece.gatech.edu
bugzilla-daemon at nsnam-www.ece.gatech.edu
Wed Jun 18 06:45:16 PDT 2008
http://www.nsnam.org/bugzilla/show_bug.cgi?id=181
tjkopena at cs.drexel.edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
------- Comment #10 from tjkopena at cs.drexel.edu 2008-06-18 09:45 -------
Hi all,
The fix for the bounds that was applied is incorrect, or I am seriously
confused. It currently, quite frequently, generates values outside the bounds.
I am not sure if the original code had this behavior or not. The below
snippet will bomb pretty much every run. I suspect that the readjustment of
m_static_next if found out-of-bounds is incorrect, but have not investigated
further.
Thx
bool bomb = 0;
double mean = 1.0, variance = 0.2, bound = 0.75;
for (int x = 0; x < 50; x++) {
double x = NormalVariable::GetSingleValue(mean,variance,bound);
if (x < mean-bound || x > mean+bound) {
bomb = true;
std::cout << "** ";
}
std::cout << x << std::endl;
}
if (bomb)
std::cout << std::endl << "BOMBED" << std::endl;
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Ns-bugs
mailing list