Bugzilla – Full Text Bug Listing |
Summary: | double Time::GetSeconds() precision or rounding issue | ||
---|---|---|---|
Product: | ns-3 | Reporter: | Tom Henderson <tomh> |
Component: | core | Assignee: | ns-bugs <ns-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | craigdo, mathieu.lacage, raj.b |
Priority: | P5 | ||
Version: | ns-3-dev | ||
Hardware: | All | ||
OS: | Linux |
Description
Tom Henderson
2008-12-09 19:33:43 EST
Shouldn't this be P1? (In reply to comment #1) > Shouldn't this be P1? > Yes, if others confirm this. I think it will show in the nightly regression. Bumping to P1. - This is reproducible on ns-old (32-bit Linux version 2.6.20-1.2320.fc5, gcc version 4.1.1, with Intel(R) Pentium(R) 4 CPU 1400MHz). - This is reproducible on Cygwin 1.5.25-15, gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) - Passes on OS/X Intel. changeset d6f0c6f47cc4 (In reply to comment #4) > changeset d6f0c6f47cc4 > (changing title to reflect the actual problem) In hindsight, this is well documented in the doxygen, but it is a bit troublesome that what is probably an intuitive and first response to the problem m_residualBits += (uint32_t)(m_cbrRate.GetBitRate() * delta.GetSeconds()); almost but not quite works. There is no instance of class Scalar in our examples/ or samples/ file. This probably needs some sample code. It may be another situation reminiscent of vecteur velocite, but the type Scalar seemed odd to me. When I read scalar, I tend to think of scalars, vectors and tensors. This leads me (at least) off into a completely wrong line of thought about what Scalar is all about. I think we have a Vector and a Scalar classl but they have absolutely nothing to do with each other ... Perhaps since there are no public intances of the use of the type Scalar, we can intercept this and call it something else? From the doxygen, it seems that the implication is that this type is used to scale Time. Scaler would be closer to what it does, but that is just super-confusing. It seems to me that it is really something along the lines of a "dimensionless temporary variable with sufficient precision to store intermediate results of a Time computation." Off the top of my head I can come up with: IntermediateTime TemporaryTime TimeTemp DimensionlessTime (oxymoron?) Scalar really confuses me. (In reply to comment #6) > It may be another situation reminiscent of vecteur velocite, but the type > Scalar seemed odd to me. When I read scalar, I tend to think of scalars, > vectors and tensors. This leads me (at least) off into a completely wrong line > of thought about what Scalar is all about. > > I think we have a Vector and a Scalar classl but they have absolutely nothing > to do with each other ... > > Perhaps since there are no public intances of the use of the type Scalar, we > can intercept this and call it something else? > > From the doxygen, it seems that the implication is that this type is used to > scale Time. Scaler would be closer to what it does, but that is just > super-confusing. > > It seems to me that it is really something along the lines of a "dimensionless > temporary variable with sufficient precision to store intermediate results of a > Time computation." > > Off the top of my head I can come up with: > > IntermediateTime > TemporaryTime > TimeTemp > DimensionlessTime (oxymoron?) > > Scalar really confuses me. sorry but it makes perfect sense to me and none of the proposed alternatives look very good. I should point out that it makes zero sense to reopen the original bug report for this discussion. What you and tom seem to be getting to is an entirely different matter than a regression test failing. I thought we had agreed to open a separate bug report for each separate issue. anyway, to summarize my position on the last issue craig raised, NOTABUG for me and I would normally close it. I'm not really sure why calling this bug "445" instead of "441" is super-important, but I closed this one and opened another. reverting the name since there is another one to track the issue into which this developed. |