Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id s589uqHK009340 for ; Sun, 8 Jun 2014 11:56:53 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx101) with ESMTPS (Nemesis) id 0MCbtO-1X2tFU3jIg-009TnT for ; Sun, 08 Jun 2014 11:56:47 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s589rsqa025785 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 Jun 2014 11:53:54 +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 s57M15dq015747; Sun, 8 Jun 2014 11:53:53 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 11059543 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sun, 8 Jun 2014 11:53:53 +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 s589rrqO029261 for ; Sun, 8 Jun 2014 11:53:53 +0200 Received: from smtp5.clear.net.nz (smtp5.clear.net.nz [203.97.33.68]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s589rge9025736 for ; Sun, 8 Jun 2014 11:53:46 +0200 Received: from mxin2-orange.clear.net.nz (lb2-srcnat.clear.net.nz [203.97.32.237]) by smtp5.clear.net.nz (CLEAR Net Mail) with ESMTP id <0N6U003WEGTHWM20@smtp5.clear.net.nz> for LATEX-L@listserv.uni-heidelberg.de; Sun, 08 Jun 2014 21:53:42 +1200 (NZST) Received: from 121-74-38-86.telstraclear.net (HELO [127.0.0.1]) ([121.74.38.86]) by smtpin2.clear.net.nz with ESMTP; Sun, 08 Jun 2014 21:53:41 +1200 MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit X-Antivirus: avast! (VPS 140608-0, 08/06/2014), Outbound message X-Antivirus-Status: Clean User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 Message-ID: <539432A6.7030205@clear.net.nz> Date: Sun, 8 Jun 2014 21:53:42 +1200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: aparsloe Subject: Juxtaposition in l3fp To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE 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:hnb0KmuEfgg=:3RKRBe/uR23kvOVRHAjvp1Ynwq RGejr85MNEwPFMPdwOCBqr6nPWIn2zl9EdFYti0djklfTi0Fjy+YQ444QRQl+Xuj8M0s7DPsW aZqLkrpxiWdU2iNE0iV8JYrfDo9lgHAZRpEj4RJZE3ARaiw3JeIkGnn2OQaRXX4tlM5gm91Uj qnNYZ3lEud9cb2kmKHqEVTIwejqcq7eCO1KZBL6yZLT6Ik/oX12qFk81RWKoCLfPf0Y9OWXY6 4npCPmQCS+rIRZ476yP1yJe7I+xuOo3qNBj+bE0iTKJv95vGuFEV9MXGdPFx1QUbJiMA3yoIR gutAQ+9YUW5S125/d9RHgwOkmJ9M9VZQy1LpjQzGhJ0Z83rfmzZdfhyHuMOhF5ZDB+Le8tIgd oK2k/P+FH+btFflxHttsI9mUTbcRGnnElHL37yK7cNZIuGlvJq54PwNAKakprGyOTci3cehmt 6/NcOWfPoRIJijfQv2D/vkkgbYkfdu7ksAdFs7JkE0PYkPiLHu4O/TTlaB3XMbexquF4Vuitc 804rgGSFTpmD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EkOfrHxeyLviZMLXVyzK4/txAKLeznQ= Status: R X-Status: X-Keywords: X-UID: 7486 Should l3fp use juxtaposition *at all* to indicate multiplication? I am an enthusiast for l3fp. I am using it constantly (in LyX using LyX's instant preview to evaluate formulas), but that has simply heightened my unease about using juxtaposition to indicate multiplication, particularly as part of a kernel package. Most people using numbers have their mental reflexes shaped either by mathematical usage or calculator or spreadsheet usage. The last two, to my knowledge, don't allow juxtaposition. Multiplication must be explicitly indicated with an asterisk. Mathematical usage is variable and often irregular but there is a certain core understanding. In a polynomial like 2x^3-5x^2-9 it is universally understood that the cubing and squaring applies only to the x, not the coefficients. In l3fp, however, because juxtaposition has the highest precedence, the coefficients are "glued" to the x so that it is 2x that is cubed and 5x that is squared (e.g. on putting (2+3) for x). Usually the answers from "normal" and l3fp evaluation will be sufficiently different to alert one to the fact that something has gone wrong, but occasionally they will be "in the same ball park" and may lead to overlooking an error. For instance scaling paper sizes or text blocks may lead one to seek the length of the diagonal of a rectangle, say the initial one with sides 21cm and 29.7cm and a larger one with sides 1.2 times greater. What is the larger diagonal? By similarity, it is 1.2 times the length of the smaller diagonal. It is very easy to write 1.2(21^2+29.7^2)^.5 (with 1.2\times\sqrt{21^2+29.7^2} in mind), evaluate it with fp and get 39.85cm. This is wrong but not too obviously different from the correct 43.65cm. Juxtaposition also produces conflicts with established practice (calculators, spreadsheets) for function calls. Yes, sin2pi evaluates to 0 as does sin(2pi), but sin(2pi)(2pi) = 0.978... does not, so that a function's argument is not delimited by parentheses, even when parentheses are used. That also breaks a long-established practice and seems like a source of error for the unwary. I find myself now shunning juxtaposition and making a point of explicitly indicating multiplication with an asterisk, even in cases like 2*pi -- in other words making it a habit of mind precisely to avoid these "traps for the unwary". I imagine the juxtapositional horse has well and truly bolted, but I find myself wondering if it still might be possible to graft a strict "calculator front end" onto l3fp to align its operations with more familiar habits of mind? Andrew Parsloe