Bugzilla – Bug 1856
int64x64_t double conversions
Last modified: 2014-03-02 04:18:24 EST
Conversions between int64x64_t and double/long double have problems: - no proper test cases - incorrect results on some platforms/some configurations These are producing failed or crashed tests on some platforms: fedora-20 32 bit, gcc 4.8.2, optimized ubuntu 10.04, gcc 4.4.3
The test failing on Fedora Core 20, 32 bit, optimized build is global-routing, due to an off-by-one difference in integer to double conversions. The test that is crashing on gcc-4.4.3 is int64x64. Just noting the additional information so that duplicate bugs are not reported.
This turns out to expose several issues: - grossly insufficient test coverage - int64x64 implements Q64.64 fixed precision arithmetic, but fractions were mishandled or not even implemented - output of int64x64 was subtly wrong, because the patch for bug 1786 was tested against the buggy int64x64 implementation Pending patch: - implements complete test coverage - handles fractions correctly - fixes int64x64 output (again)
Patch r10637 67601c471c22 http://code.nsnam.org/ns-3-dev/rev/67601c471c22 This leaves four tests failing because of deltas of 1 ns in Times, ultimately affecting pcap output.
Patch r10638 aa85c4fcd5d7 http://code.nsnam.org/ns-3-dev/rev/aa85c4fcd5d7 Update test reference pcap for: TestSuite devices-mesh-dot11s-regression TestSuite devices-mesh-flame-regression TestSuite routing-aodv-regression TestSuite routing-olsr-regression