Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id s520JCGf022818 for ; Mon, 2 Jun 2014 02:19:13 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx007) with ESMTPS (Nemesis) id 0M678U-1Wb7kf0fXu-00y7jO for ; Mon, 02 Jun 2014 02:19:07 +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 s520GZuK008112 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 2 Jun 2014 02:16:35 +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 s520GYb3009867; Mon, 2 Jun 2014 02:16:34 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 11051805 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 2 Jun 2014 02:16:34 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s520GYBH009862 for ; Mon, 2 Jun 2014 02:16:34 +0200 Received: from smtp5.clear.net.nz (smtp5.clear.net.nz [203.97.33.68]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id s520GLAK013634 for ; Mon, 2 Jun 2014 02:16:25 +0200 Received: from mxin3-orange.clear.net.nz (lb2-srcnat.clear.net.nz [203.97.32.237]) by smtp5.clear.net.nz (CLEAR Net Mail) with ESMTP id <0N6I0024QM32D530@smtp5.clear.net.nz> for LATEX-L@listserv.uni-heidelberg.de; Mon, 02 Jun 2014 12:16:20 +1200 (NZST) Received: from 121-74-37-8.telstraclear.net (HELO [127.0.0.1]) ([121.74.37.8]) by smtpin3.clear.net.nz with ESMTP; Mon, 02 Jun 2014 12:16:15 +1200 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7bit X-Antivirus: avast! (VPS 140531-1, 01/06/2014), Outbound message X-Antivirus-Status: Clean References: <5382FD21.6040600@clear.net.nz> <53865805.7030602@clear.net.nz> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 Message-ID: <538BC24D.6040901@clear.net.nz> Date: Mon, 2 Jun 2014 12:16:13 +1200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: aparsloe Subject: Re: l3fp and sin(pi), cos(pi/2) 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:GrLVB47WgbY=:1TyuX+JmK+ha3FLL82AtaXcTik fsmQOTXkl79XV73c/p2iR6EFwdNkV5Gz/0ZK9lRkHUJh9Ir4fSN88ps5ypUTTeZ9WvZAIwr3q KuhFiUL5OSsCpd6rN3KPdyKzptDRbZCZULQLe2lSpKo39LBqZtCQPX+UYQWsynutpvh/Zv/hH tpndLeLOl3tnxbzWPbe1j+WhxMuSDYf/ItEE4TQo3aVG1TBH+3quZo5JkHYYF/YwPL+al1Hs2 0AJu/YaLkbvoOoHyYoWQrSmlZjPnUsX+68rLLTKbaf9PoSg5f2YAjeHSuugJbDN4TmZ7nDUH7 3kXfykL0SouaPuAymyj3fWSGoM3lNCRfFIOKuIOUj0fC0wKWuQ88529rHy+CcUSuYtHnomUP6 zxTJOIZ8ks5UEtavNAkhB7UP236LKMJNqEuTYKD9sM3And5qau5YWV73Rhs3Y10MD9B+vAtLC 6QO/XZcUqyCtYueuBtk9jQeogyDjm0ub1M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Cw0FkgS4yrzMzvVOdRVOH9EOsqz1Z6Gfzva3JgC/8n4ww== X-UI-Loop:V01:tQ4xKcvCa9M=:gazIia95BZfhA4/N9x/2a6UH5hIfAD9EOHP/QsYj7nI= Status: R X-Status: X-Keywords: X-UID: 7478 On 2/06/2014 5:40 a.m., Bruno Le Floch wrote: >> I had the experience recently of checking a complicated trigonometric >> expression derived, after an embarrassingly long labour, from another >> complicated trigonometric expression. Had I made a mistake in the >> working? I evaluated the expressions using l3fp. One, for a number of >> different parameter values gave 0, the other for the same parameter >> values gave -0. I concluded, ruefully, that the derivation was correct. > Note that \fp_compare:nTF { 0 = -0 } { true } { false } gives true, so > you could just let l3fp compare the numbers. I have to say I'm > surprised by that use of l3fp: I'd definitely use a general purpose > programming language for that (e.g., python). Happy l3fp helps. > > Bruno I use LyX. LyX has its instant preview facility, in particular for maths. I'm revising a package (not publicly available yet, but I will at some stage put a link to it on the LyX wiki) that turns well-formed formed latex expressions like \tfrac{4}{3}\pi r^{3}, which are easy to write in LyX's math editor, into "feedstock" for l3fp. Giving the variables particular values, the result snaps into view "before one's eyes". It's like having an upside-down pile of used envelopes beside one (only much faster) for numerically exploring formulas that are part of the text (and therefore already written). The main problem has centred around "juxtaposition = multiplication" and the fact that juxtaposition has precedence over function calls so that (for instance) exp(foo)(bah)(baa)(bar) in l3fp raises e to the power of the product of foo and bah and baa and bar. This is most unlikely to be what is intended in a mathematical argument and so my package inserts an asterisk: \exp{foo}(bah) in latex becomes exp(foo)*(bah) for the l3fp feedstock. Andrew