From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24382 invoked by alias); 8 Feb 2018 09:47:21 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42346 Received: (qmail 9246 invoked by uid 1010); 8 Feb 2018 09:47:21 -0000 X-Qmail-Scanner-Diagnostics: from mailout2.w1.samsung.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(210.118.77.12):SA:0(-6.9/5.0):. Processed in 1.992077 secs); 08 Feb 2018 09:47:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,T_DKIM_INVALID, T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: p.stephenson@samsung.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180208093823euoutp0261d1cbfa38b191569c4fc103efbb7c35~RUCz8WX7n2214922149euoutp02f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1518082703; bh=jAcXzU2A2a16sk9rODpOLMb1Q4S1KksCwnFw6MfmJ90=; h=Date:From:To:Subject:In-reply-to:References:From; b=Uemo7KmXlMnM78M/dGy3q0CbU3a6K7j6JzM1oV7y9ZpRDLoMYghro3utrBZqhW7qY H8rcr9GloxFGCOKEYAi1EjMDj37XSNhcPL6WIZaxZrmKErVxGjyKyUO8b4/NxKBtD6 SZ7cbcB0hB5N1crDeQQS67Ios2dLQBX2vGsrRcz0= X-AuditID: cbfec7f2-f793b6d000003243-37-5a7c1a8e2804 Date: Thu, 08 Feb 2018 09:38:20 +0000 From: Peter Stephenson To: Zsh hackers list Subject: Re: inf and nan in arithmetic expansions Message-id: <20180208093820.21a10bd4@pwslap01u.europe.root.pri> In-reply-to: <4253.1518045946@thecus.kiddle.eu> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrDIsWRmVeSWpSXmKPExsWy7djP87p9UjVRBtu/qlkcbH7I5MDoserg B6YAxigum5TUnMyy1CJ9uwSujLNXOtgKznFWzN3xjr2B8RR7FyMnh4SAicTxUz+hbDGJC/fW s3UxcnEICSxllJjSdJYVwullkpi54AVLFyMHWEfTAxaQBiGBZYwSvbMyIexpTBKXv5VA1J9m lPgw5SQThHOGUWL7wudMIFUsAqoSbaf7wLrZBAwlpm6azQhiiwhoSew4eRKsRhgovuXpJLAa XgF7ifeLTzGD2JwC+hK9P6exgdj8QPbVv5+YIM62l5h55QwjRL2gxI/J98B6mQV0JLZte8wO YctLbF7zlhmifgGbxLyDUL0uEoen/WWEsIUlXh3fAg0KGYnLk7tZIOx+Rokn3b4gz0gIzGCU OH1mBxtEwlqi7/ZFRogFfBKTtk1nhoQQr0RHmxBEiYfE7kWw4HWU+LznMzRE1zBKTLq0i20C o8IsJHfPQnL3LCR3L2BkXsUoklpanJueWmysV5yYW1yal66XnJ+7iRGYBk7/O/5pB+PXE1aH GAU4GJV4eD9YVkcJsSaWFVfmHmKU4GBWEuHdI1oTJcSbklhZlVqUH19UmpNafIhRmoNFSZzX NqotUkggPbEkNTs1tSC1CCbLxMEp1cC4PYk/WPHzt1XOHhvubSoufSd1e+9k7dX3/Y6qmMrk Mv35uOGx18KQvASbda7BGmc2s1cFK0op5soZ/ThZfkfk5OdzX1Jc2QquGR/dcux5HH/I0pfh y5ZZzdT6/vpB1vygFxobzt3TL5t66fwXb9bsS98DvRbWy/xPuvhOb87eU7uu2T5p7rg+RYml OCPRUIu5qDgRAElX4O7/AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrALMWRmVeSWpSXmKPExsVy+t/xa7p9UjVRBseOc1scbH7I5MDoserg B6YAxigum5TUnMyy1CJ9uwSujLNXOtgKznFWzN3xjr2B8RR7FyMHh4SAiUTTA5YuRk4gU0zi wr31bF2MXBxCAksYJW50v2CCcGYwSfT0dTNDOKcZJU6v7GCFcM4wSqx9e4UVpJ9FQFWi7XQf 2Cw2AUOJqZtmM4LYIgJaEjtOnmQCsYWB4lueTgKr4RWwl3i/+BQziM0poC/R+3Ma1O41jBLz F/aAFfEDJa7+/cQEcaC9xMwrZxghmgUlfky+B1bDDLRg87YmVghbXmLzmrdgQ4UE1CVu3N3N PoFReBaSlllIWmYhaVnAyLyKUSS1tDg3PbfYSK84Mbe4NC9dLzk/dxMjMJy3Hfu5ZQdj17vg Q4wCHIxKPLwfLKujhFgTy4orcw8xSnAwK4nw7hGtiRLiTUmsrEotyo8vKs1JLT7EKM3BoiTO e96gMkpIID2xJDU7NbUgtQgmy8TBKdXA2Chx9qqphFX1LF6b7O27n/9KvGeWuOuksMuXWYE3 guUvzfhxhLk3jd1j8rQG26Uide98p/i8uWjwYlun54uFHipf527b0dSZuu3QRf2fhsrrLvPc LPSSqn9rpvVDbnbxmlsqp0PYJt6TTO14pxu7eanapdzvCyrWSTyd+Xin5OK5iQ8viaklzVdi Kc5INNRiLipOBAByBqD6YwIAAA== X-CMS-MailID: 20180208093822eucas1p2e30e43ad66a0a7054493379930feaf5b X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180208073241epcas2p48a6d5f95ba0c1e0dfdf15c6c3a0b0609 X-RootMTR: 20180208073241epcas2p48a6d5f95ba0c1e0dfdf15c6c3a0b0609 References: <20180207223051.GA30393@chaz.gmail.com> <4253.1518045946@thecus.kiddle.eu> On Thu, 08 Feb 2018 00:25:46 +0100 Oliver Kiddle wrote: > Stephane Chazelas wrote: > > > > neither "inf." nor "inf" are understood in arithmetic > > expressions (and for "inf.", nor by other tools like awk, or > > even the builtin printf): > > > It should be safe to change zsh so that inf. (and Inf. INF. NAN. > > nan., maybe also Infinity.) are recognised in arithmetic > > expression, as it's currently invalid, but that leaves the > > problem of "inf." not being recognised by other tools > > (awk/printf). > > There was actually a patch posted back in workers/19597 to do this. I > don't know why it never got integrated other than that a certain > amount of integration work was perhaps required. > > It might be possible to forward port that work from 4.1.1 to the current > release. Would that be welcomed or was the original patch rejected for > good reasons? That's fine by me --- I'd completely forgotten. The math code only evolves fairly slowly. I'd be a little bit worried if there were cases that produced errors before that no longer do. But given that typically the result is "inf." with no error at the moment, that may well not be a real problem. pws