From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 0154F3858C2C for ; Tue, 21 Dec 2021 10:14:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0154F3858C2C Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-287-9_c3c-WkP1ChcbsSkUJEIw-1; Tue, 21 Dec 2021 05:13:58 -0500 X-MC-Unique: 9_c3c-WkP1ChcbsSkUJEIw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3C1A8190A7A2; Tue, 21 Dec 2021 10:13:56 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.104]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0BFAD45D9C; Tue, 21 Dec 2021 10:13:54 +0000 (UTC) From: Florian Weimer To: "H.J. Lu via Libc-alpha" Cc: "H.J. Lu" , Joseph Myers Subject: Re: [PATCH 2/2] math: Add X_TLOSSf [BZ #28713] References: <20211220231817.4051571-1-hjl.tools@gmail.com> <20211220231817.4051571-2-hjl.tools@gmail.com> Date: Tue, 21 Dec 2021 11:13:52 +0100 In-Reply-To: <20211220231817.4051571-2-hjl.tools@gmail.com> (H. J. Lu via Libc-alpha's message of "Mon, 20 Dec 2021 15:18:17 -0800") Message-ID: <87mtkub6zj.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Dec 2021 10:14:04 -0000 * H. J. Lu via Libc-alpha: > diff --git a/math/math-svid-compat.h b/math/math-svid-compat.h > index 5c18cb1b03..61d22ce461 100644 > --- a/math/math-svid-compat.h > +++ b/math/math-svid-compat.h > @@ -48,7 +48,8 @@ struct exception > extern int matherr (struct exception *__exc); > extern int __matherr (struct exception *__exc); > > -#define X_TLOSS 1.41484755040568800000e+16 > +#define X_TLOSS 0x1.921fb54442d180000000p+53 > +#define X_TLOSSf 0x1.921fb6p+53 Is it possible to use a preprocessor macro with token pasting to create a correctly rounded flaot constant from X_TLOSS? #define AS_FLOAT_CONSTANT_1(x) x##f #define AS_FLOAT_CONSTANT(x) AS_FLOAT_CONSTANT_1(x) I expect that GCC will not raise any exceptions when such a constant is evaluated at run time. Thanks, Florian