Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id s6B8Ui7g003378 for ; Fri, 11 Jul 2014 10:30:45 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx004) with ESMTPS (Nemesis) id 0LtUkm-1WdvBK0f12-010uID for ; Fri, 11 Jul 2014 10:30:39 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id s6B8RLKZ016365 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Jul 2014 10:27:21 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s6AM14vi001467; Fri, 11 Jul 2014 10:27:20 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 11116735 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 11 Jul 2014 10:27:20 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s6B8RK6Q018933 for ; Fri, 11 Jul 2014 10:27:20 +0200 Received: from smtp3.clear.net.nz (smtp3.clear.net.nz [203.97.33.64]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s6B8R42K032318 for ; Fri, 11 Jul 2014 10:27:08 +0200 Received: from mxin3-orange.clear.net.nz (lb2-srcnat.clear.net.nz [203.97.32.237]) by smtp3.clear.net.nz (CLEAR Net Mail) with ESMTP id <0N8J00H2LGT2PX00@smtp3.clear.net.nz> for LATEX-L@listserv.uni-heidelberg.de; Fri, 11 Jul 2014 20:27:03 +1200 (NZST) Received: from 121-74-46-87.telstraclear.net (HELO [127.0.0.1]) ([121.74.46.87]) by smtpin3.clear.net.nz with ESMTP; Fri, 11 Jul 2014 20:27:02 +1200 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7bit X-Antivirus: avast! (VPS 140710-1, 11/07/2014), Outbound message X-Antivirus-Status: Clean References: <539432A6.7030205@clear.net.nz> <5395A7A3.7040106@residenset.net> <5395AA02.8040704@morningstar2.co.uk> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 Message-ID: <53BF9FD5.8070805@clear.net.nz> Date: Fri, 11 Jul 2014 20:27:01 +1200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: aparsloe Subject: Re: Juxtaposition in l3fp To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:fBEdYW4niwk=:yyg58+9Pq6bbGKoNipVVaLEOcd hANttHmku9I5X8zF5oeeWRC4MLjU1GtsSxN//PWEFk8CnwWP1uOHHK3lQwVWlloNgL8GdZDRu lHTe/g2JhbGafHrH33QE5yGicJsh7idiL5DIoCjhuXK9WuUVf2aBETZqetcrd8070wPrDP2OS cWSV+Kqu+LSHQaCqrCTRBIQuw8MoVVfqM0wGtKu1ZMN3M0PPf9Nqqx3T3gSutT8zy6NNUj27D cvB5GEJ4gOUWlM7UaBUh0P8gpF0Pb/naF94NjdRVV3Xf3Y6tZmT6wngIxCYoCVfNZLUw8YkAy JINgTCgLV0qsrzVLFCD0MUruETqwA2d2ucgDKc4sdC5z2xtEDMNCl+TNvebCIFxYmDaRW3AsA VEfI3H6g+uRmBePGZ5XZuHTPs/wdgIFYlS8R+HF51YEwneFp/Wz6xYjZK4M8nbuXJhl1ngI8B 6p4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tsjn6undB Qf0wF97ljPSbNqNTjh0GmF6vqmnpuAad8+8x2gNJimvOBVc2dgC/srz8uMfxwpqyLS/ZmCeYq PAALZsipVWfWneoRXO1XyN/Q12aDYnQ7 X-UI-Loop:V01:kUxvoWN3xk8=:lPgsXYDtdJs/sYPOw4MWzccuOfgS8oMHKVQgFPJ0EXI= Status: R X-Status: X-Keywords: X-UID: 7541 On 11/07/2014 11:20 a.m., Bruno Le Floch wrote: > Hello list, > > Sorry for the >1 month delay. This is a followup to the thread asking > whether letting juxtaposition denote multiplication was a good idea. > I think it was, but I made a big mistake in making juxtaposition be > multiplication with a _different precedence_ than the asterisk. ... > In l3fp, I pushed the idea to its extreme, allowing juxtaposition for > things other than units, and I kept the precedence as being the > tightest possible. > > As Lars rightfully says it's "consistent, but not necessarily > intuitive". Andrew has given several cases where my choice leads to a > terrible behaviour for l3fp, and there is basically no case where the > current behaviour is better (well, there was one abusive one: with > this rule, exp.5ln(...) computes the square root, but now that is not > needed). Actually, I've found this "abuse" quite a handy device, and despite the introduction of the sqrt function to l3fp, for n-th roots, exp(1/n)ln has a certain convenience. > I'm keen on leaving juxtaposition = multiplication, because that > allows to use dimensionful numbers directly inside fp expressions (pt, > in, ... are defined as floating point constants). I believe that we > should change the precedence of juxtaposition-as-multiplication from > what it currently is (the tightest) to being the same as > multiplication. In other words, juxtaposition would behave exactly > identically to adding an asterisk. > > Would that make sense? Am I missing something crucial (probably... I > didn't realize when allowing juxtaposition what a mess I was > creating)? > > Best regards, > Bruno Thanks for the response Bruno (but "terrible" is a strong word). The suggested new precedence would certainly take care of the examples that tripped me up and that seemed like traps for the unwary. There is one other precedence which troubles me a little. I read an expression like ln(1+1/n)^n as 'raise (1+1/n) to the n-th power then take the logarithm' ( = n*ln(1+1/n) ). l3fp treats this as ( ln(1+1/n) )^n I realise that in the absence of clarifying parentheses there is an inherent ambiguity in such forms which needs to be resolved in a fixed manner one way or the other. I question whether l3fp has chosen the intuitive way, or the way of customary practice. For instance we write ("incorrectly" but the practice is universal) sin^2 x rather than sin x^2 when we want to square the sine of x, presumably because sin x^2 suggests the sine of x^2. In short, should the precedence levels of function calls and raising to a power be interchanged? With your proposed change to juxtaposition's precedence, this would bring l3fp into line with customary "habits of mind".* Andrew * Well, my mind!