[3.3 Patch] Fix libstdc++/14220

Gabriel Dos Reis gdr@integrable-solutions.net
Sun Feb 22 17:47:00 GMT 2004


Paolo Carlini <pcarlini@suse.de> writes:

| 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?

Yes.  Thanks,

-- Gaby



More information about the Libstdc++ mailing list