From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7610 invoked from network); 24 Feb 2003 17:49:17 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 24 Feb 2003 17:49:17 -0000 Received: (qmail 21127 invoked by alias); 24 Feb 2003 17:49:09 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18283 Received: (qmail 21115 invoked from network); 24 Feb 2003 17:49:09 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 24 Feb 2003 17:49:09 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [213.228.0.176] by sunsite.dk (MessageWall 1.0.8) with SMTP; 24 Feb 2003 17:49:8 -0000 Received: from pcchazelas.free.fr (grenoble-1-a7-62-147-74-79.dial.proxad.net [62.147.74.79]) by postfix4-2.free.fr (Postfix) with ESMTP id E2B52C0BB for ; Mon, 24 Feb 2003 18:49:03 +0100 (CET) Received: (from chazelas@localhost) by pcchazelas.free.fr (8.9.3/8.9.3) id SAA09946 for zsh-workers@sunsite.dk; Mon, 24 Feb 2003 18:45:03 +0100 Date: Mon, 24 Feb 2003 18:45:03 +0100 From: Stephane CHAZELAS To: Zsh hackers list Subject: LC_NUMERIC=fr_FR and floating point arithmetics Message-ID: <20030224184502.A9922@pcchazelas.free.fr> Mail-Followup-To: Zsh hackers list Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.3.14i $ LC_NUMERIC=fr_FR ksh93 -c 'float a=1; echo $(( a / 3 ))' 0,333333333333 $ LC_NUMERIC=fr_FR zsh -c 'float a=1; echo $(( a / 3 ))' 0,33333333333333331. zsh seems to assume that "." is the decimal separator which is not correct in a french locale. I agree this is confusing. A ksh93 script such as echo $(( 1. / 3 )) won't work under french locale. (must be echo $(( 1, / 3 )) ) (tried with zsh 4.1.0-dev-7) -- Stéphane