Bugzilla – Bug 831
Insufficient numerical precision of timestamped simulation time in the ascii trace file (ns-3.7)
Last modified: 2010-05-16 18:25:59 UTC
Overview: The simulation time expressed in seconds and timestamped in the ascii trace file has insufficient numerical precision, and can cause erroneous results especially for high-speed wired data networks. Compare with bug 830 http://www.nsnam.org/bugzilla/0 The only difference between the two bugs is in the underlying NS3 modules: in ns-3-dev OutputStreamWrapper was responsible, in ns-3.7 AsciiWriter is. In AsciiWriter module case, the bug can be fixed in exactly the same way as in OutputStreamWrapper (see bug 830 http://www.nsnam.org/bugzilla/1 ).
With the new tracing framework, a user can set the floating point precision of the underlying stream to whatever is required. AsciiTraceHelper helper; Ptr<OutputStreamWrapper> stream = helper.CreateFileStream ("file"); stream->GetStream ()->precision (8); Does that meet your needs?