Bug 831

Summary: Insufficient numerical precision of timestamped simulation time in the ascii trace file (ns-3.7)
Product: ns-3 Reporter: Jakub Konka <jakub.konka>
Component: coreAssignee: Craig Dowell <craigdo>
Status: RESOLVED INVALID    
Severity: normal CC: craigdo, ns-bugs
Priority: P5    
Version: ns-3.7   
Hardware: PC   
OS: Linux   

Description Jakub Konka 2010-03-03 18:36:51 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﷓ ).
Comment 1 Craig Dowell 2010-04-07 14:45:49 UTC
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?