From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26548 invoked by alias); 12 Jan 2015 00:02:20 -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: X-Seq: 34244 Received: (qmail 28346 invoked from network); 12 Jan 2015 00:02:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Authority-Analysis: v=2.1 cv=X+5rdgje c=1 sm=1 tr=0 a=eU9hTuDD8Zxpg9gGyKEu9Q==:117 a=eU9hTuDD8Zxpg9gGyKEu9Q==:17 a=Hpgzp-inWqAA:10 a=N659UExz7-8A:10 a=ejw6jKoxHnukIxhXxYMA:9 a=pILNOxqGKmIA:10 Message-id: <54B30F05.1090207@eastlink.ca> Date: Sun, 11 Jan 2015 16:02:13 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.3.0 MIME-version: 1.0 To: zsh-workers@zsh.org Subject: Re: Floating point modulus References: <1420807419-9270-1-git-send-email-mikachu@gmail.com> <54B013C5.6090307@eastlink.ca> <54B04A7A.1010402@eastlink.ca> <20150109223028.6e003bff@ntlworld.com> <54B066C5.3010008@eastlink.ca> <54B0D893.4080202@eastlink.ca> <510FB8E2-EA0C-4582-BD31-527E9755F0FB@larryv.me> <54B1ACA3.1050001@eastlink.ca> <150110175849.ZM21774@torch.brasslantern.com> <54B20E23.8090900@eastlink.ca> <150110231017.ZM24021@torch.brasslantern.com> <150111113601.ZM29941@torch.brasslantern.com> <20150111200119.134bfe2d@ntlworld.com> <150111120423.ZM10129@torch.brasslantern.com> <20150111202538.4859dbe0@ntlworld.com> In-reply-to: <20150111202538.4859dbe0@ntlworld.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 01/11/2015 12:25 PM, Peter Stephenson wrote: > I'll leave that to you, but instead of an explicit rounding you could > do basically the same calculation but assigned to a variable declared > as an integer and output that.xs pws remainder=$1 Ignore this question if it can't be explained simply, since I don't have the knowledge probably to even understand the answer, but why is it more complicated than (for example) this: while [[ $remainder > $2 ]]; do let remainder=$remainder-$2 done ... can't that sorta be attached to " % " without dozens of lines of changed code? Seems not :( And: /* 25 */ BOOL|OP_A2IO, LR|OP_A2IO, RL|OP_OP, RL|OP_OP, RL|OP_E2, -/* 30 */ RL|OP_E2, RL|OP_E2, RL|OP_E2, RL|OP_E2, RL|OP_E2IO, ... are those 'metas'? IOW, is that the internal representation of some command syntax? Metafied? Tokenized? ... >