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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6542 invoked from network); 16 Nov 2021 09:07:22 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 16 Nov 2021 09:07:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:cc:Reply-To: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=FmuV8EgBIqYtG5gnA+skj/zxU9DBIISLWpGiG2B0Zl0=; b=sCmpFuNr6YRQb4u0ponvvzwm+2 U2ezYAXrKYWrP1+96C/GMO9pxX0E/WoAvAAZQ561ByGVGaCULZiWdU0kPe3W14jkIIyVCAzqy0nYE tC0VsNYmrjAt9vjCksfYJdJ4Xq2Uf6Nf3fKhW0ux2ftviEK89yhzqQHRHa1cJjZNE2YAGcDBLPbwZ 4Tm9zJWEHJVsK6M+o69IEi9mzn/HsUVqQdPSlFedebdk9lcPTaU4OrmyAvABK/PtZy9WCUQ/0DV+I PQHYyUKF3HRSvIc3bz4SXMCOJm8SgpHmovcvraX9qVDLKeLETjndVmPi4sit7yklUXS3xyYJ6+NFu k3iLLb1Q==; Received: from authenticated user by zero.zsh.org with local id 1mmuQx-000H1l-V6; Tue, 16 Nov 2021 09:07:20 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mmuQU-000Gkv-GJ; Tue, 16 Nov 2021 09:06:50 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.94.2) (envelope-from ) id 1mmuQT-0006U7-Gn; Tue, 16 Nov 2021 10:06:49 +0100 cc: Zsh hackers list In-reply-to: From: Oliver Kiddle References: To: Martijn Dekker Subject: Re: [BUG] POSIX arith: inf, nan should be variables MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24929.1637053609.1@hydra> Date: Tue, 16 Nov 2021 10:06:49 +0100 Message-ID: <24930-1637053609.517514@-QOU.SIKw.N7wo> X-Seq: 49591 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: Martijn Dekker wrote: > $ zsh --emulate sh -c 'inf=1; nan=2; echo $((inf)) $((nan))' > Inf NaN > > Expected: 1 2 > So, what shell option to tie that to? That's a bit difficult. It needs The closest comparable feature is the decision in params.c as to whether it should setup other special variables that aren't in the standard. That seems to only check something like !EMULATION(EMULATE_SH) rather than an actual option. Much of that has to run before zsh has got as far as sourcing dot files that might setup options so it likely never made sense to create an option for it. Most uses of directly checking emulation state seem to be in initialisation code. I wouldn't rename an option for compatibility. And while OCTAL_ZEROES is similar in controlling interpretation of numbers in math mode it differs in that it enables a potentially problematic standard feature while Inf/NaN are a zsh extension. So I wouldn't view preferences on them as being intrinsically linked. Oliver