From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17801 invoked by alias); 9 Jan 2015 23:52:24 -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: 34198 Received: (qmail 17613 invoked from network); 9 Jan 2015 23:52:11 -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 MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=windows-1252; format=flowed X-Authority-Analysis: v=2.1 cv=T/C1EZ6Q c=1 sm=1 tr=0 a=U8x73H08pUQ9rBATJ7Nnpg==:117 a=U8x73H08pUQ9rBATJ7Nnpg==:17 a=Hpgzp-inWqAA:10 a=N659UExz7-8A:10 a=DgpvXhNXJOcOVQJhO5cA:9 a=pILNOxqGKmIA:10 Message-id: <54B069A9.2040504@eastlink.ca> Date: Fri, 09 Jan 2015 15:52:09 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.3.0 To: =?windows-1252?Q?Lawrence_Vel=E1zquez?= Cc: zsh-workers@zsh.org Subject: Re: Math expression evaluation error? References: <54B03024.1030309@gmail.com> <20150109201552.1304eafe@ntlworld.com> <54B04ADA.9050102@gmail.com> <54B05407.7090303@eastlink.ca> <775A96D9-12A6-499B-8AAB-B2431F13701D@larryv.me> In-reply-to: <775A96D9-12A6-499B-8AAB-B2431F13701D@larryv.me> On 01/09/2015 03:06 PM, Lawrence Velázquez wrote: > On Jan 9, 2015, at 5:19 PM, Ray Andrews wrote: > >> I wonder tho why anyone would ever want the first set of results. Who/why/when >> do we want bad math? > Mathematics restricted to the set of integers is not "bad math", no matter how much you assert that it is. I assert nothing, I ask a question. I just 'automatically' presume that zsh calculations will be done like any normal calculator would do them. $ echo $(( 3/8 + 5/8 )) 0 .. if that's what people want, then that's what they'll get, it just seems a bit strange to me. I'd say that the very fact that I enter a fraction tells the shell that I'm expecting a real number answer. Or maybe not. But that's just my take on it, I'm not saying. It seems to me that if the shell accepts the fractions then it should return the correct answer. I'd make integer math the option and have accurate results as the default but that's just me.