How to detect a double's significant digits

Steven Bethard steven.bethard at gmail.com
Thu May 5 14:17:15 EDT 2005


mrstephengross wrote:
> First of all, str() is not a function.

Yes it is.

> float f = 1.004;
> ostringstream s;
> s << f;
> cout << s.str();

This doesn't look like Python to me.  Are you sure you're on the right 
newsgroup?

STeVe



More information about the Python-list mailing list