From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28439 invoked by alias); 14 May 2015 21:33:02 -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: 35138 Received: (qmail 15130 invoked from network); 14 May 2015 21:32:59 -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, SPF_HELO_PASS autolearn=ham version=3.3.2 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: zsh-workers@zsh.org To: zsh-workers@zsh.org From: Emanuel Berg Subject: Re: why do ceil/floor give the decimal dot? Date: Thu, 14 May 2015 23:38:03 +0200 Message-ID: <87siay262s.fsf@debian.uxu> References: <87oalodmns.fsf@debian.uxu> <150513195617.ZM29493@torch.brasslantern.com> <87d223et0a.fsf@debian.uxu> <20150514105349.52338d94@pwslap01u.europe.root.pri> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: nl106-137-66.student.uu.se Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:4yiB0vDI0ld8AobHrSs+Vdalj5s= Peter Stephenson writes: > So if you're happy it does fit, just convert to > integer yourself. Yeah, but you see what happened? On the one hand, you shouldn't care what type it is and leave that to the shell to work out. On the other hand, if you want output that is manageable and that conforms with how humans think of integers as well as the output of ceil and floor, then you must convert to int manually! I like the solution better to have the types all floats (or whatever) and then use printf to make it look the way you want. -- underground experts united http://user.it.uu.se/~embe8573