This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [3.3 Patch] Fix libstdc++/14220
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: 22 Feb 2004 18:38:26 +0100
- Subject: Re: [3.3 Patch] Fix libstdc++/14220
- Organization: Integrable Solutions
- References: <4038E9DB.2070305@suse.de>
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