From nobody Wed Jul 17 17:30:39 2024 X-Original-To: freebsd-numerics@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPNJK1d01z5RmtL for ; Wed, 17 Jul 2024 17:30:57 +0000 (UTC) (envelope-from enh@google.com) Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPNJJ1K5Pz4QM2 for ; Wed, 17 Jul 2024 17:30:56 +0000 (UTC) (envelope-from enh@google.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=google.com header.s=20230601 header.b=YVsYbApl; dmarc=pass (policy=reject) header.from=google.com; spf=pass (mx1.freebsd.org: domain of enh@google.com designates 2607:f8b0:4864:20::82e as permitted sender) smtp.mailfrom=enh@google.com Received: by mail-qt1-x82e.google.com with SMTP id d75a77b69052e-44926081beaso40141391cf.3 for ; Wed, 17 Jul 2024 10:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1721237455; x=1721842255; darn=freebsd.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=qAIwH7pbkCUaKsL1bIhFS5V4w2fMFRjtsSUOGwWdttI=; b=YVsYbAplZe+8Qillg2+uUKuAR0/x7JcJC+lPzYZ2hQZIQskmtrKORCRCAL+Mp9e4vk YDg4bru8dUBY20FjLpAkVClKY8/gDk1lfHDg6VwhaABnxLC1KzBINo3RisVBIShcFPSs frDCjtWY2ze7dQmYwnuuiOeo9iUz/TI6WfaMla8DDhGMt3UDh4G2FjjBzCpBiJ+WjJiw 9Xq8PJLx6K5xWEF/Ud+wO4bEW/afvHgn8JpVaflz2YRUPNbJiyVS+nSKXBYj1yHOmwOO wapc1TKLicpOHOIvrxYmpzjEuY5ZPjIdVdqtiGPdmNAbAr8dP/oRtOdOrkEtmqq0Gl9W L+OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721237455; x=1721842255; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=qAIwH7pbkCUaKsL1bIhFS5V4w2fMFRjtsSUOGwWdttI=; b=xJy54nxP8fx9e+tvJvCQ+U8sCyg8qOTOGV7+8MZxVEieFpHHDqEUeflYcXE58iwkng o88wsF/3StJhmhO0toC6NMR+Hyz3gftSbHfNrAmi+R42VCN2BlemMwNEK1QhHJuSOIg+ afUBAz+tDX4ChasWRn1QZRzLNeghNDcgJWTiO4Es3p8biuswXfey247xeWVtddxotD1e TBAYBaM/LPIFPneC1Q4NToLlIywXXF/6GNhbG3AEaSR2vfhDPmgy6Is3kgZoovMHmXrr shLT6ENGFj8Nb05C5I+8rbA+MKMHc11vSSAXSD1+l+bYdicdx0aPlqaYQFMZt2kqXN4H Y43Q== X-Gm-Message-State: AOJu0YwvndY35mJOEJV9PqtMlfWtbiW7w6TR4ZDrf4hWBWRzIQ00thJV 1/PXQ3W8RVrdAy+8Gl+UIgHQ4z3x97uSN4aqr5qUl7topKmwifyA9ridFZZIFsm0kACX1CIOYCY y95LKf2t0oLe7SZEMNK7gtkq4oXjeYO1fe0GeUVmWrY+lmfOC6gsFBQY= X-Google-Smtp-Source: AGHT+IFvqtvdYkDdXqm2NlcWEAp1k+b3c5J3UoYtOXXtBoHGB9ITsrAErfxuO2IB+s/nGycMczJjX5lbDINVmgWZJOg= X-Received: by 2002:a05:6214:d66:b0:6b5:a5:f5f2 with SMTP id 6a1803df08f44-6b79ca6dbd9mr873926d6.55.1721237455005; Wed, 17 Jul 2024 10:30:55 -0700 (PDT) List-Id: Discussions of high quality implementation of libm functions List-Archive: https://lists.freebsd.org/archives/freebsd-numerics List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-numerics@FreeBSD.org MIME-Version: 1.0 From: enh Date: Wed, 17 Jul 2024 13:30:39 -0400 Message-ID: Subject: #pragma STDC FENV_ACCESS ON To: enh via freebsd-numerics Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; DMARC_POLICY_ALLOW(-0.50)[google.com,reject]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[google.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; DWL_DNSWL_NONE(0.00)[google.com:dkim]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-numerics@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::82e:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-numerics@freebsd.org]; DKIM_TRACE(0.00)[google.com:+] X-Rspamd-Queue-Id: 4WPNJJ1K5Pz4QM2 i see lib/msun/src/e_sqrtl.c has `#pragma STDC FENV_ACCESS ON`, but s_fma.c, s_fmaf.c, s_fmal.c, and s_nearbyint.c all use fesetround() or fesetenv() too --- shouldn't they also have the pragma? (Android currently builds all of libm with that pragma, but (a) that seems like a big hammer and (b) afaict upstream [you] don't, so this is potentially causing problems^W^Wallowing the compiler to cause problems for you?) From nobody Wed Jul 17 20:01:17 2024 X-Original-To: freebsd-numerics@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPRdz11Pvz5QHXT for ; Wed, 17 Jul 2024 20:01:27 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPRdy4WWYz4dLl for ; Wed, 17 Jul 2024 20:01:26 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Authentication-Results: mx1.freebsd.org; none Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.17.1/8.17.1) with ESMTP id 46HK1Hsv014813; Wed, 17 Jul 2024 13:01:17 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) DKIM-Filter: OpenDKIM Filter v2.10.3 troutmask.apl.washington.edu 46HK1Hsv014813 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=troutmask.apl.washington.edu; s=troutmask; t=1721246477; bh=3vCfsYAKL25t/s0GVV88Uu+mn9DxwUDVgQdvSqs4ecU=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=hH5P76qmonVsJHGL7OSQyeUpCFpZ/ysEiR9+OJjJVzn5OkNjmV76TtuvPPtbHQzg/ 61n5gcX+VsRf9x2TRWIXSX43QtMLuJaZV+D83hqOeVVbiLnFgp8r5JTZHx/goVHyTq qJ78z9hAFBQ3kKNok64BZ39KZw6z/jmc26ElCnR9wiFs+SVykWGYaCpa5wnk8uKrG5 /s7yeVrQruAN1WFyLwDPbOmp0w/CXijILCpvgtdPQAIaqNOFSY+vtQxXbMjsH0MldA DLf+FaTwGmpQClT3wtV8NeP9Qy3LDOM9nuj6GeaIU9VONHxBI2OS9M7S0pjijAS6YW gyC3IX0losNLA== Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.17.1/8.17.1/Submit) id 46HK1Hnm014812; Wed, 17 Jul 2024 13:01:17 -0700 (PDT) (envelope-from sgk) Date: Wed, 17 Jul 2024 13:01:17 -0700 From: Steve Kargl To: enh Cc: enh via freebsd-numerics Subject: Re: #pragma STDC FENV_ACCESS ON Message-ID: Reply-To: sgk@troutmask.apl.washington.edu References: List-Id: Discussions of high quality implementation of libm functions List-Archive: https://lists.freebsd.org/archives/freebsd-numerics List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-numerics@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US] X-Rspamd-Queue-Id: 4WPRdy4WWYz4dLl On Wed, Jul 17, 2024 at 01:30:39PM -0400, enh wrote: > i see lib/msun/src/e_sqrtl.c has `#pragma STDC FENV_ACCESS ON`, but > s_fma.c, s_fmaf.c, s_fmal.c, and s_nearbyint.c all use fesetround() or > fesetenv() too --- shouldn't they also have the pragma? > > (Android currently builds all of libm with that pragma, but (a) that > seems like a big hammer and (b) afaict upstream [you] don't, so this > is potentially causing problems^W^Wallowing the compiler to cause > problems for you?) Some of the compilers, which that are used to compile FreeBSD, do not support "#pragma STDC FENV_ACCESS ON". #include #include #pragma STDC FENV_ACCESS ON int main(void) { double x = 1, y = 3; printf ("x _ y = %la\n", x + y); return 0; } % gcc13 -c -Wall a.c .c:5: warning: ignoring '#pragma STDC FENV_ACCESS' [-Wunknown-pragmas] 5 | #pragma STDC FENV_ACCESS ON | -- Steve From nobody Wed Jul 17 20:16:33 2024 X-Original-To: freebsd-numerics@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPRzf6Snwz5QJPV for ; Wed, 17 Jul 2024 20:16:46 +0000 (UTC) (envelope-from enh@google.com) Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPRzf1sMQz4fRJ for ; Wed, 17 Jul 2024 20:16:46 +0000 (UTC) (envelope-from enh@google.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-e05f4c63de6so130248276.0 for ; Wed, 17 Jul 2024 13:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1721247405; x=1721852205; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zWXs+Us1tLz0qMvT6H+pYzagq51MeOp7YDXR6Otdfhw=; b=o8+SzCba6Up9JCrE3wPEbBcQP2LZ2s/ObCQ2Qcf0wjREZwAcu0029TEVu4sxoN6dRb YyDzl8pikBwm9dfvwm0oVxgUkn89aRmTlJjR+HLA/L+yFQKWHACOZAfA5NFr+6ICgOy/ 7kKbU4CP1LLUx0zqjjBiMtIjuWzLgBN/BmomlB2tZfbE1iYaCqmsZ77HPCSFrNksoeLa 7pd1Pip9YcIeD/1hKWSSK/CAArSX5cKsfzjx8fJfnej6IIUQwsE1RMuktEpJ9paUTShi zxybIbCBVRqNBDLDBecUGYra4cYbYEdhPlyWJxONYvwVryz9I6ZobCkBPkrCLlQgP8hk zLsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721247405; x=1721852205; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zWXs+Us1tLz0qMvT6H+pYzagq51MeOp7YDXR6Otdfhw=; b=hkEMwaJ1oeEtOSKrlLUiy7r3VbtcT0DFcPe7/bVhBlj97GCPUh34pzZyCCwcBSAVki KC3YrflDPfSoqQ64ARp7oJ4tHkjf0DD0tlZ/sfLTwpIyvZenT9ye2AUCY+ZlvqkKw5P9 nxvo5MlHLC2764JgrK01WJLPL8zkLkdf+l+qBFQ5AVeXc5/pCxMyEHeVSZhZKTxkuUBw 54iEUXctVJNlwipKQ/R8JGu76IdvKFPiw+HQimuxNVg1yah3sVrfnpH7tf4bclqeTs8d 6NnE4J7F/mDn6Yab/DwTZq0kRzpqx/DyouWAClAxm8ENAj4b6hx6JO9Yj94PRmdcxbAd lcqg== X-Gm-Message-State: AOJu0Yy870xBC7sbPaxC/QAy8jfwTHB760Ixcd4D9hnh5/iK/TNWEJCS NAB1Ltxz/i1Wadt6q8L7Sc0/BG2b8stt7yVyD6Yu/RuoZf4iiGL+JL1fYhLZaW/jSTbiUFRIphu G3stEufoc2P0wA6VeccFDgHm9rivREzvXK7jLhQm44fB/4Y8tfEwA X-Google-Smtp-Source: AGHT+IHbre8AujRcrvmiT+K1sIuVcxqUL8j1CAhr8f5QYDTusw6k/2YabYf6lMfd8uvKSVEiBJQdMfeTYIgC0WQ4sVo= X-Received: by 2002:a05:6902:120c:b0:e05:fc30:7057 with SMTP id 3f1490d57ef6-e05febc8674mr681202276.43.1721247405143; Wed, 17 Jul 2024 13:16:45 -0700 (PDT) List-Id: Discussions of high quality implementation of libm functions List-Archive: https://lists.freebsd.org/archives/freebsd-numerics List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-numerics@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: enh Date: Wed, 17 Jul 2024 16:16:33 -0400 Message-ID: Subject: Re: #pragma STDC FENV_ACCESS ON To: sgk@troutmask.apl.washington.edu Cc: enh via freebsd-numerics Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4WPRzf1sMQz4fRJ On Wed, Jul 17, 2024 at 4:01=E2=80=AFPM Steve Kargl wrote: > > On Wed, Jul 17, 2024 at 01:30:39PM -0400, enh wrote: > > i see lib/msun/src/e_sqrtl.c has `#pragma STDC FENV_ACCESS ON`, but > > s_fma.c, s_fmaf.c, s_fmal.c, and s_nearbyint.c all use fesetround() or > > fesetenv() too --- shouldn't they also have the pragma? > > > > (Android currently builds all of libm with that pragma, but (a) that > > seems like a big hammer and (b) afaict upstream [you] don't, so this > > is potentially causing problems^W^Wallowing the compiler to cause > > problems for you?) > > Some of the compilers, which that are used to compile FreeBSD, > do not support "#pragma STDC FENV_ACCESS ON". that's why you have a line in the Makefile to quiet the warning :-) (remember you _do_ have this #pragma in e_sqrtl.c already.) > #include > #include > > #pragma STDC FENV_ACCESS ON > > int > main(void) > { > double x =3D 1, y =3D 3; > printf ("x _ y =3D %la\n", x + y); > return 0; > } > > % gcc13 -c -Wall a.c > .c:5: warning: ignoring '#pragma STDC FENV_ACCESS' [-Wunknown-pragmas] > 5 | #pragma STDC FENV_ACCESS ON > | > > -- > Steve > From nobody Wed Jul 17 20:26:57 2024 X-Original-To: freebsd-numerics@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPSCR5RGQz5QKnk for ; Wed, 17 Jul 2024 20:26:59 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPSCR4GQ1z4fnh for ; Wed, 17 Jul 2024 20:26:59 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Authentication-Results: mx1.freebsd.org; none Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.17.1/8.17.1) with ESMTP id 46HKQwrM015400; Wed, 17 Jul 2024 13:26:58 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) DKIM-Filter: OpenDKIM Filter v2.10.3 troutmask.apl.washington.edu 46HKQwrM015400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=troutmask.apl.washington.edu; s=troutmask; t=1721248018; bh=rsJebNUPPgf3b0VbLnMKFXAFPUx0xSs0+RFY/E3sZB4=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=rjEVL7nQE9qGY2X2SZJu0e6Mu/aqulD0C6b2FOWAyuclS1K7vpfWcnVlseMx0QBH5 MKAq+DfYyKJOy56EqgLu+2ybZb3csPfHDgWXJ9u8IhBeIQ2TXnbrp/DqdJd0kL7GnZ YzbvsgTuQHxr4/Ue2oe6txkGGAsThdZr8Tg6rkgtyDxV4oOq8e/+yAKXsVqB1czE8W r6m8VAzs5CeB5TuX/COcpEQ6xXch3bqEAWkK5w7M9qXpDzAJMHQ8bLAdliJTylVjPI Z3MhL6VbrBIVKLS9DHaG2AniZ0gES7lrKFIgkNasH58Aky2hKs/BUwYO3NqTd8oRLt 9quvM95PQa3UA== Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.17.1/8.17.1/Submit) id 46HKQvlL015399; Wed, 17 Jul 2024 13:26:57 -0700 (PDT) (envelope-from sgk) Date: Wed, 17 Jul 2024 13:26:57 -0700 From: Steve Kargl To: enh Cc: enh via freebsd-numerics Subject: Re: #pragma STDC FENV_ACCESS ON Message-ID: Reply-To: sgk@troutmask.apl.washington.edu References: List-Id: Discussions of high quality implementation of libm functions List-Archive: https://lists.freebsd.org/archives/freebsd-numerics List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-numerics@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US] X-Rspamd-Queue-Id: 4WPSCR4GQ1z4fnh On Wed, Jul 17, 2024 at 04:16:33PM -0400, enh wrote: > On Wed, Jul 17, 2024 at 4:01 PM Steve Kargl > wrote: > > > > On Wed, Jul 17, 2024 at 01:30:39PM -0400, enh wrote: > > > i see lib/msun/src/e_sqrtl.c has `#pragma STDC FENV_ACCESS ON`, but > > > s_fma.c, s_fmaf.c, s_fmal.c, and s_nearbyint.c all use fesetround() or > > > fesetenv() too --- shouldn't they also have the pragma? > > > > > > (Android currently builds all of libm with that pragma, but (a) that > > > seems like a big hammer and (b) afaict upstream [you] don't, so this > > > is potentially causing problems^W^Wallowing the compiler to cause > > > problems for you?) > > > > Some of the compilers, which that are used to compile FreeBSD, > > do not support "#pragma STDC FENV_ACCESS ON". > > that's why you have a line in the Makefile to quiet the warning :-) > > (remember you _do_ have this #pragma in e_sqrtl.c already.) > Then your original post is simply a rhetorical question? Consider it future-proofing for when all compilers supprt the pragma. -- Steve From nobody Wed Jul 17 20:47:01 2024 X-Original-To: freebsd-numerics@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPSfn57qpz5QMT5 for ; Wed, 17 Jul 2024 20:47:13 +0000 (UTC) (envelope-from enh@google.com) Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPSfn3Jqwz4kB4 for ; Wed, 17 Jul 2024 20:47:13 +0000 (UTC) (envelope-from enh@google.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb2f.google.com with SMTP id 3f1490d57ef6-e05e898f29bso117064276.2 for ; Wed, 17 Jul 2024 13:47:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1721249232; x=1721854032; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=QVDLeMo8v96sFxSqdEWVkXAqZDHmx4Pe0RLWJ/36K90=; b=vmZRaRfItiAh67ahhuA1hcfx2k3XJ2T0kjxOEesW5SNzFssPNXsquf9hqRY8oIzLgc aUOOoG270TzfTqxl6zQK4YqNSljaywaLWSIDYP26kFN3CAZ75t4lBqAHveXohAlEanRD sJFzQkfxTImx+gIaaxqArj3SNdPtOK5UwNMhpf1xreIt2GWIxXhr+qVpIUeBsYTAD9GA mrUklfhBU8P5KFkARbHYvmuTOAteN4kKmCgY6LWXTScKA40bTv7pki5pWG9hyTGppQPu jq2tABb7sTwnynIm5KMwGzM3ET2zQX+lCDKUKx7jJLQFBffkIbSdT2TYqbjU/IXUFG4Z Sy7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721249232; x=1721854032; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QVDLeMo8v96sFxSqdEWVkXAqZDHmx4Pe0RLWJ/36K90=; b=AkrE6gAa6ZRS8Gre1i5lDJqzN7n9HNd/LhTRaAt/M9fGrbkq0klECg5UC+wTPz6DiD svf0MroA0e77eYVOYVMFbjIwcBPUiwqQYvrHcphms4/09FLK5HXOwIXnaIOUI9ImdvKo OwKAli9/brA5Wi5pTMslxlAWwFFN4ondNFkvBry9RktuEIOC4+FO7bFR3TuI0DL32m/R hdCmbA1V0GrgbE7N9/onu+zEJ/tVVtCTYsOdFiDhFtgYKm4igfDsPIdQLpHZF8mis+xb GWwucOWqnQaz2z4Ndy8lBeN1zvNJ5o7cHqm55zwUp/eTMHCzJEME58yENQrFen60viT2 /e1Q== X-Gm-Message-State: AOJu0YxJyUw/9Vy6Etj8eBnwlz4sw7OP6A7quNt7yJoVi5Z9RZN3ICLd dvd02QTrT/adW++78pdSmduyqJ+qlCpFOQETknt+RFCtQS2hvcRLkGlpNgpqCcembSboQ8aY+fm 3jkvWpZe4GRPU9fAYmJzYzxejLzT1VSPwHGmFMc5IK2jRE/dwbV67P6s= X-Google-Smtp-Source: AGHT+IFMoY0F3luyICR2NvZ1QpnBnDO1+xT5LU2tqU6S5gMwcV+Vc3RfcIrwOVRv9binOa/3nGTb09SSlsjZD5nvDk4= X-Received: by 2002:a05:6902:2582:b0:e05:d738:c322 with SMTP id 3f1490d57ef6-e05ed798c28mr2951091276.43.1721249232267; Wed, 17 Jul 2024 13:47:12 -0700 (PDT) List-Id: Discussions of high quality implementation of libm functions List-Archive: https://lists.freebsd.org/archives/freebsd-numerics List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-numerics@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: enh Date: Wed, 17 Jul 2024 16:47:01 -0400 Message-ID: Subject: Re: #pragma STDC FENV_ACCESS ON To: sgk@troutmask.apl.washington.edu Cc: enh via freebsd-numerics Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4WPSfn3Jqwz4kB4 On Wed, Jul 17, 2024 at 4:27=E2=80=AFPM Steve Kargl wrote: > > On Wed, Jul 17, 2024 at 04:16:33PM -0400, enh wrote: > > On Wed, Jul 17, 2024 at 4:01=E2=80=AFPM Steve Kargl > > wrote: > > > > > > On Wed, Jul 17, 2024 at 01:30:39PM -0400, enh wrote: > > > > i see lib/msun/src/e_sqrtl.c has `#pragma STDC FENV_ACCESS ON`, but > > > > s_fma.c, s_fmaf.c, s_fmal.c, and s_nearbyint.c all use fesetround()= or > > > > fesetenv() too --- shouldn't they also have the pragma? > > > > > > > > (Android currently builds all of libm with that pragma, but (a) tha= t > > > > seems like a big hammer and (b) afaict upstream [you] don't, so thi= s > > > > is potentially causing problems^W^Wallowing the compiler to cause > > > > problems for you?) > > > > > > Some of the compilers, which that are used to compile FreeBSD, > > > do not support "#pragma STDC FENV_ACCESS ON". > > > > that's why you have a line in the Makefile to quiet the warning :-) > > > > (remember you _do_ have this #pragma in e_sqrtl.c already.) > > > > Then your original post is simply a rhetorical question? no. i said: 1. e_sqrtl.c has `#pragma STDC FENV_ACCESS ON` 2. s_fma.c, s_fmaf.c, s_fmal.c, and s_nearbyint.c all use fesetround() or fesetenv() but _don't_ have the pragma that is: #1 implies you think this is needed, but #2 shows that it's inconsistently applied in places where it's needed. > Consider it future-proofing for when all compilers supprt > the pragma. "future proofing" is exactly why i'm suggesting you should probably have the pragma in the other files that use the relevant functions :-) > -- > Steve >