How can one dump the exact value of a double variable to the console/terminal? I can do something like this:
Qt Code:
  1. // var1 & var2 are both set elsewhere
  2. qDebug() << var1;
  3. qDebug() << var2;
  4. qDebug() << QString::number(var1,'f',4);
  5. qDebug() << QString::number(var2,'f',4);
  6. qDebug() << (var1 == var2);
To copy to clipboard, switch view to plain text mode 

This result will be:
Qt Code:
  1. 0.05
  2. 0.05
  3. 0.0500
  4. 0.0500
  5. false
To copy to clipboard, switch view to plain text mode 


I have worked around these issues in the past with silly stuff like:
Qt Code:
  1. var1 = (double)((int)((var1*100)+0.5))/100;
To copy to clipboard, switch view to plain text mode 

I'm not asking for the best workaround for rounding these numbers, merely what is the easiest way to dump the exact value of the variable, and not have it formatted via QT in some way?