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 >