[Bug libstdc++/49048] New: setprecision rounding fails in some cases

2011-05-18 Thread s.cecilio at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49048 Summary: setprecision rounding fails in some cases Product: gcc Version: unknown Status: UNCONFIRMED Severity: major Priority: P3 Component: libstdc++ AssignedTo: una

[Bug libstdc++/49048] setprecision rounding fails in some cases

2011-05-18 Thread s.cecilio at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49048 --- Comment #2 from Cecilio 2011-05-18 20:23:23 UTC --- printf output is 5798.12. I think this is the expected output. Does this confirms your guess? (sorry, I don't understand your previous answer. My knowledge about GCC is just the name "GCC".

[Bug libstdc++/49048] setprecision rounding fails in some cases

2011-05-18 Thread s.cecilio at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49048 --- Comment #4 from Cecilio 2011-05-19 05:39:43 UTC --- Ok Thank you, I will report to glbc. But, to try to learn and understand something, could you please answer a question for me?: My understanding is that printf truncates, so 'printf("%.2f"

[Bug libstdc++/49048] setprecision rounding fails in some cases

2011-05-19 Thread s.cecilio at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49048 --- Comment #6 from Cecilio 2011-05-19 07:12:25 UTC --- Thanks for the link. Funny website but a great article at wikipedia. Thanks indeed. Now I understand the issue, so there is no bug anywere! I always understood 'rounding' as 'rounding up'.

[Bug libstdc++/49048] setprecision rounding fails in some cases

2011-05-19 Thread s.cecilio at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49048 --- Comment #8 from Cecilio 2011-05-19 17:01:15 UTC --- Thanks again, Paolo and Jackub, for your help and explanations. Believe it or not, I a have a PhD and had to learn a lot of complex mathematics, but I never heard about so many types of 'rou