[3.3 Patch] Fix libstdc++/14220
Paolo Carlini
pcarlini@suse.de
Sun Feb 22 17:41:00 GMT 2004
Hi all, hi Gaby,
I'd like to apply this fix to the branch *before* mainline and 3_4,
since seems quite obvious and there we are still working on the fast
output of floats, which will change completely the affected function.
In a nutshell, without the patch this testcase outputs two different
numbers, whereas, according to 22.2.2.2.2, those should be identical
since everything must go as if printf were called:
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
cout << fixed << setprecision(25) << 5.55555555e-17 << '\n';
printf("%.25f\n", 5.55555555e-17);
}
Tested x86-linux.
Ok?
Paolo.
////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_14220
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040222/3f71c6b6/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_14220
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040222/3f71c6b6/attachment-0001.ksh>
More information about the Libstdc++
mailing list