Bug 863 - Wrong Scalar arithmetics
Wrong Scalar arithmetics
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: core
ns-3-dev
All All
: P2 critical
Assigned To: Mathieu Lacage
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-07 02:39 EDT by Pavel Boyko
Modified: 2010-04-08 07:19 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Boyko 2010-04-07 02:39:47 EDT
Test program:

#include <iostream>
#include "ns3/simulator-module.h"

int main ()
{
  std::cout << (ns3::Scalar (0.9) / ns3::Scalar (1.0)).GetDouble () << "\n";
  return 0;
}

Expected output: 0.9 
Actual output (ns-3-dev changeset:   6103:12931126ea21) : -0.1
Comment 1 Mathieu Lacage 2010-04-08 07:19:43 EDT
changeset 2ae38db64dd1