Possible regression from gcc-3.0.x to gcc-3.2.x with std::setprecision

Benjamin Kosnik bkoz@redhat.com
Thu Jan 2 20:44:00 GMT 2003



>    http://gcc.gnu.org/ml/libstdc++/2002-12/msg00064.html
>
>Basically, libstdc++ in v3.2 (and above), limits the maximum precision
>of a double to 16([1]) digits, whereas the constant
>
>    std::numeric_limits<double>::min()
>
>needs 18 digits in order to write it out to a stream, and read it back
>from the stream to make it compare equal....
>
>gcc-3.0 limited the precision to 18([2]) digits....
>
>[1] std::numeric_limits<float, double>::digits10 + 1
>[2] std::numeric_limits<float, double>::digits10 + 3

This should be fixed. What you should do is make a self-contained test
case (as small as you can make it) and open a new GNATS report about
this.

thanks,
benjamin



More information about the Libstdc++ mailing list