This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [3.3 Patch] Fix libstdc++/14220


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]