From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-04.nifty.com (conssluserg-04.nifty.com [210.131.2.83]) by sourceware.org (Postfix) with ESMTPS id 16302385843F for ; Wed, 1 Dec 2021 12:06:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 16302385843F Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=nifty.ne.jp Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp Received: from Express5800-S70 (z221123.dynamic.ppp.asahi-net.or.jp [110.4.221.123]) (authenticated) by conssluserg-04.nifty.com with ESMTP id 1B1C5shb018043 for ; Wed, 1 Dec 2021 21:05:54 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 1B1C5shb018043 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1638360354; bh=Ku8wP9kXpWSFIEvmIukck7MElZRpO4QC+SHcWEJBdeo=; h=Date:From:To:Subject:In-Reply-To:References:From; b=RIqNeF8CLz0WrX9ERzNAHjDY9MOGAvU37YO6SXS5TH7XVtXUcWltSVMjAglLgmxzM xWQMo4X9XI7xJWYsJd+lJqaZnYtO49HB74Snk1NgsnrDIr8TzdHUsfYcQT4icCzGEN WmVFWwutPbTxYFy+nzgJ35myYqgVbMndIEQTQByLOlWSOTsizuxmCHSoebgXC5PjS5 K26VXHN6PyGArDV5bwsSjZ4EOFjZ3/jE5ApwL/xrZtz6VE5d7q6UBT6bVFRJ2TYDUn dqLwGk8G6RKjY7rwkeUIZnNL+iN3ByK5RbrJGFKuvD05Ej2eG594fB4IZJm4/9yHYG Hts4H9cu5+SNg== X-Nifty-SrcIP: [110.4.221.123] Date: Wed, 1 Dec 2021 21:05:55 +0900 From: Takashi Yano To: newlib@sourceware.org Subject: Re: gcc 11.1.0: printf("%.43f\n", 0x1.52f8a8e32e982p-140): printed value is incorrectly rounded Message-Id: <20211201210555.9c674f656c750730b279a641@nifty.ne.jp> In-Reply-To: References: <20211128164311.c405014bdf153aec8de46c6e@nifty.ne.jp> <20211128213839.90567fce0606267eb0362cc3@nifty.ne.jp> <20211128221646.4c6f751029f31af953565702@nifty.ne.jp> <20211129195646.c4f66449ff164a0c6bad4d2e@nifty.ne.jp> <20211129232439.ea273a79602b671f8b76383c@nifty.ne.jp> <20211130195156.4d8c0cec184743241c3c3146@nifty.ne.jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Dec 2021 12:06:19 -0000 On Tue, 30 Nov 2021 16:09:26 +0100 Corinna Vinschen wrote: > Could some people with other targets than Cygwin give this patch a try? > RTEMS, anybody? I have confirmed new gdtoa code works with a simple printf test for the following two platforms. - aarch64 (128bit long double with little endian) - armv7l (64bit long double with little endian) Actually, LDBL_MANT_DIG == DBL_MANT_DIG in armv7l platform, so gdtoa code would not be used. To make gdtoa code be used forcibly, a simple patch was applied for vfprintf.c and gdtoa-ldtoa.c. Without this patch, _dtoa_r is used even for long double, which also works as expected. -- Takashi Yano