From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2874 invoked by alias); 18 Apr 2008 21:28:06 -0000 Received: (qmail 12624 invoked by uid 48); 18 Apr 2008 20:57:31 -0000 Date: Fri, 18 Apr 2008 21:28:00 -0000 Message-ID: <20080418205731.12623.qmail@sourceware.org> From: "eberlein at us dot ibm dot com" To: glibc-bugs@sources.redhat.com In-Reply-To: <20070919134419.5044.vincent+libc@vinc17.org> References: <20070919134419.5044.vincent+libc@vinc17.org> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/5044] printf doesn't take the rounding mode into account X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00127.txt.bz2 ------- Additional Comments From eberlein at us dot ibm dot com 2008-04-18 20:57 ------- Created an attachment (id=2713) --> (http://sourceware.org/bugzilla/attachment.cgi?id=2713&action=view) Revised patch to allow printf_fp to get rounding mode using _FPU_GETCW Vincent, I see what you mean about taking into account whether the rounded digit is followed by zeroes. Rounding upward should never result in a value that is less than the original value, which wasn't caught when the rounded digit is zero followed by nonzero digits. I'm attaching a patch that modifies the existing ties-to-even code to work for FE_UPWARD and FE_DOWNWARD that checks for trailing zeroes when the rounded digit is zero. -- What |Removed |Added ---------------------------------------------------------------------------- Attachment #2706 is|0 |1 obsolete| | http://sourceware.org/bugzilla/show_bug.cgi?id=5044 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.