From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12944 invoked from network); 23 Apr 2021 16:46:03 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 23 Apr 2021 16:46:03 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1619196363; b=VPY2/MHqqX2/2l5A64wmmwN8GPzXFwA3v0Fl+TPa/2g4TapsqIg08leUyXpIVXr/QtjKKXEofX e3EiLs9TlroGvHwwZrrnbd9GvCkVF/92MS1bMt8TY4hPJ3DhGlA9RN6pLthgcGA0S0zxrY5eBC vbR7+cjC0dnEXPupaXXAorD1q4Ml6A1S2gIcPkA+r6xP7Uiz/cISXpWAY1jao/llRTFbd229/B aYL02z1KRLSPOsHeOzhnAdyiOi6JdTOSnml3nxahT15ZYSKLlpBtU7bOcJ+Zp1KQIg6R6K7D56 BBjbwYEcaXJ0//nEndmxshrYGCPxNWx9f/cuyJg9215+kg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (joooj.vinc17.net) smtp.remote-ip=155.133.131.76; dmarc=none header.from=vinc17.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1619196363; bh=qvJijGfLMpkys+sN7OIXj7GrydpoffcV8mFeCUiMIoI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:To:From:Date:DKIM-Signature; b=Eeo4Rlu196oAk5apPutk3SGuNwWmceOPCfj0/jyAqPZewL6A0BLGk8ia9o+oaSBcSz/C+k6vAQ IaFgij7nX5P6aNFhqsw+RHa/k7oWzFc5lmpG4ikf9ivXCyHq+8Tvven5VQcCHqWJP/VtKsHSHF VClwCFeZvSN0eqCaDlkTdjLE424TJf3c2rDRkjmfQwlzwR5tK2JmM2Oc5VKEw3w98yLnR2DWHb x/HAi+vquULVyjnCMoFROsz0oIRAveNQaYfNadocm/AplVaenyHiJS6QaV2txdwpg6whpFI0Er W49s50aLQxouUpC9eHdBbcs7P9upef/Pt3cMKkI0OaG0mw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=phCF9GElMy/Xp8YJhmJDIepg/6p4LJMbwzSTt7SCEHg=; b=G5E6xyDix4r8zDumiFlLk5drlL UcvlrPbgdZTry/vU/kb+3deVfNvYowh7n04EcygRCoWEq6K0DuYhd0FIkOwsFOWRDqvcIAHZJ/zMb jwRLfUgjN3kTrggsAZosrPHof6DIjflGwsH+KXzpBIkpWKliopRmwDLJL5y4v95nd50HwtHm1cty0 mbG7634GK37jDrkL4MKfOgb4gSReWHhf7T5Ik4Zy4Vanxlv8wLmVZPl3+UHKXSjbPuatJDmQDztcJ swCspWec7ZtbPzOLTtcNf0UgUcGHHonNKQ1OfLU4H4d9h5FEBCsv6qd68T8fsqPFFUOiyQWv/UNSP 1z+935Yg==; Received: from authenticated user by zero.zsh.org with local id 1lZywK-0005Xw-Cp; Fri, 23 Apr 2021 16:46:00 +0000 Authentication-Results: zsh.org; iprev=pass (joooj.vinc17.net) smtp.remote-ip=155.133.131.76; dmarc=none header.from=vinc17.net; arc=none Received: from joooj.vinc17.net ([155.133.131.76]:53306) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lZyvo-0005Ja-Rc; Fri, 23 Apr 2021 16:45:30 +0000 Received: from smtp-zira.vinc17.net (unknown [IPv6:2a01:cb19:869c:7700:6150:861a:e24c:595d]) by joooj.vinc17.net (Postfix) with ESMTPSA id F08D12D4; Fri, 23 Apr 2021 18:45:27 +0200 (CEST) Received: by zira.vinc17.org (Postfix, from userid 1000) id BA8B4C22B66; Fri, 23 Apr 2021 18:45:25 +0200 (CEST) Date: Fri, 23 Apr 2021 18:45:25 +0200 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: Re: sh emulation POSIX non-conformances ("inf"/"Inf" in arithmetic expressions) Message-ID: <20210423164525.GA2033191@zira.vinc17.org> Mail-Followup-To: zsh-workers@zsh.org References: <7FD930F4-37CD-402B-9A06-893818856199@dana.is> <20210411175726.hxnm33mxoska2tsm@chazelas.org> <20210411193154.zkekzvb4o6xmriwo@chazelas.org> <20210413071742.tisslgg5fdqbageg@chazelas.org> <20210422153100.GD154089@zira.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.0.6+158 (8162c129) vl-136976 (2021-04-22) X-Seq: 48668 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On 2021-04-22 11:55:25 -0700, Bart Schaefer wrote: > On Thu, Apr 22, 2021 at 8:31 AM Vincent Lefevre wrote: > > > > On 2021-04-13 08:17:42 +0100, Stephane Chazelas wrote: > > > I think it would be worth documenting that nan and inf are > > > recognised in arithmetic expressions (and warn against using > > > variables with the same name). > > > > IMHO, zsh should also output a warning when such variables are used. > > Exactly how would that work? When inf or nan is used in a math context and the corresponding variable exists. For instance: zira% echo $((inf)) Inf zira% inf=17 zira% echo $((inf)) Inf There should be a warning for the 3rd command. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)