From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gtd-gmbh.de (mail.gtd.eu [46.24.46.35]) by sourceware.org (Postfix) with ESMTPS id 319063857C41 for ; Tue, 25 Aug 2020 13:39:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 319063857C41 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gtd-gmbh.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=prvs=1506b25f5a=thomas.wucher@gtd-gmbh.de X-MDAV-Result: clean X-MDAV-Processed: gtd-gmbh.de, Tue, 25 Aug 2020 15:37:19 +0200 Received: from localhost [(46.237.211.46)] by gtd-gmbh.de (MDaemon PRO v19.5.5) with ESMTPSA id md50014146732.msg; Tue, 25 Aug 2020 15:37:19 +0200 X-Spam-Processed: gtd-gmbh.de, Tue, 25 Aug 2020 15:37:19 +0200 (not processed: message from trusted or authenticated source) X-MDRemoteIP: 46.237.211.46 X-MDHelo: localhost X-MDArrival-Date: Tue, 25 Aug 2020 15:37:19 +0200 X-Authenticated-Sender: thomas.wucher@gtd-gmbh.de X-Return-Path: prvs=1506b25f5a=thomas.wucher@gtd-gmbh.de X-Envelope-From: thomas.wucher@gtd-gmbh.de X-MDaemon-Deliver-To: newlib@sourceware.org Date: Tue, 25 Aug 2020 15:37:51 +0200 From: Thomas Wucher To: Keith Packard via Newlib Subject: Re: [PATCH 1/2] Avoid implicit floating point conversions [v2] Message-ID: <20200825133751.a55t6si3644bv7dg@twucher.localdomain> References: <20200821003539.942952-1-keithp@keithp.com> <20200821003539.942952-2-keithp@keithp.com> <20200824095821.GA3272@calimero.vinschen.de> <87r1rwf47t.fsf@keithp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r1rwf47t.fsf@keithp.com> X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_40, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Tue, 25 Aug 2020 13:39:38 -0000 On 24.08.20 08:33, Keith Packard via Newlib wrote: > Corinna Vinschen via Newlib writes: > > > Not taking implicit compiler optimisations into account, wouldn't it > > make more sense to avoid the conversion altogether, using > > __builtin_inf() in these places? > > Yeah, could do that instead. I think it's mostly a matter of what looks > better -- using the "standard" value of INFINITY and casting or using a > compiler internal value without. I think it'll confuse an equal number > of people either way. > > Any preferences? We would prefer the use of the standard C/Posix macros. This way the exact inf/nan return value can be controlled at a central point in the library and does not depend on a specific compiler implementation of the builtins. This ensures reproducible results across different compilers. > > -- > -keith Regards Thomas