Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id s4SLiWrL022130 for ; Wed, 28 May 2014 23:44:33 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx012) with ESMTPS (Nemesis) id 0McR8q-1X7IWw2Kzw-00HfH0 for ; Wed, 28 May 2014 23:44:26 +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 s4SLfe6K025074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 28 May 2014 23:41:40 +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 s4SFFxeV025832; Wed, 28 May 2014 23:41:39 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 11299487 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 28 May 2014 23:41:39 +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 s4SLfdbd001500 for ; Wed, 28 May 2014 23:41:39 +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 s4SLfUJX017603 for ; Wed, 28 May 2014 23:41:34 +0200 Received: from mxin1-orange.clear.net.nz (lb2-srcnat.clear.net.nz [203.97.32.237]) by smtp3.clear.net.nz (CLEAR Net Mail) with ESMTP id <0N6B0089908PO340@smtp3.clear.net.nz> for LATEX-L@listserv.uni-heidelberg.de; Thu, 29 May 2014 09:41:29 +1200 (NZST) Received: from 121-74-42-255.telstraclear.net (HELO [127.0.0.1]) ([121.74.42.255]) by smtpin1.clear.net.nz with ESMTP; Thu, 29 May 2014 09:41:28 +1200 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed X-Antivirus: avast! (VPS 140528-1, 29/05/2014), Outbound message X-Antivirus-Status: Clean References: <5382FD21.6040600@clear.net.nz> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 Message-ID: <53865805.7030602@clear.net.nz> Date: Thu, 29 May 2014 09:41:25 +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: Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by relay.uni-heidelberg.de id s4SLfe6K025074 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:44dBC2b21GU=:tCZCDE7seKEbufri2XAshfgRaA 5CmxghEsaqiNYXQuGVuOVraohqDPa196eT9cTx7N9W2bWzocEB/9PsjGQMyxVPG/fRJrlOZow u691m2mYNsIkb71A0HGBK7gHU8FHIFVfnOWNIRp1lsEeXrPXNqXZTKuwtiZ46RxPQhneD5Ryo uTLqkgYVPequVIuKibBhI88sbJOcs5svAst1e0Chn3KdfyWBQp8muOckZmImWzVFZbySAvh8O xtaShWyMxBVujPvTFU50ATlImdKcp0aMX0XO9zlv8kGXInspSFx03FJx1S+Pdkh524vB7PhCh BLtPQ10WvYlNqTKbjMtNfX+GiWEPzjguOhx7gj4YuUSYt4kjWhWc79KZRbELcY+t4dOyM1EX6 WNfSF3+aVvR86Qrf8P8n+uAWfEelZqQJGWEZ3lxTuqATwT1NgDy2hS6IS7s1rSN7k1D++ztRh hdnpt6hFehNQmJqT98HqsSv3cRsk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21J jTenOwnnTKLbUFaNMokkfum573RSMIdJYHdY4yHadoLpe0FN6TdJ51+4lcxZ3mA== X-UI-Loop:V01:Q2RYSgQx/gw=:stRH/9YMhkn+tzElpD+HxHoOvnqhplw54/lPVuZGc54= Status: R X-Status: X-Keywords: X-UID: 7460 On 28/05/2014 1:42 a.m., Bruno Le Floch wrote: > Hello Will, > >> about the typesetting; should/can we provide an easy way to typeset ne= gative >> zero just as zero? > I suppose there are two cases where one needs to display numbers: for > typesetting, and when writing to a file (terminal, log,...). For the > first case, I'd advocate using siunitx, which has all the settings you > may want, and more. For the second case, I feel that in all contexts > where 0 is better than -0 (e.g. pdf specials) there is also a need to > limit the number of significant digits to less than 16. This requires > rounding. We should provide formatting functions which produce a > string of characters from floating points. Doing this correctly is a > bit subtle, and it is not clear what should be implemented and what > can be left out (see e.g. > http://www.cplusplus.com/reference/cstdio/printf/ for a long list of > things C++ does). > >> When I was trying it out, I thought perhaps that \fp_eval:n would retu= rn >> negative zero but \fp_to_decimal:n would =E2=80=9Cnormalise=E2=80=9D i= t; is that a crazy >> idea? > I'm not keen on that, but I don't have a very strong argument against > it. Mainly, -0 is the correct result, so I don't see what's wrong > with it. Actually... thinking about it, there is an easy way to get 0 > for -0: add +0 to it. It turns out that 0+(-0) =3D +0, so for all x, > 0+x is exactly x, except when x is -0, then 0+x is +0. If I remember > correctly, the signs of (=C2=B10)=C2=B1(=C2=B10) are not mandated by th= e standard, so > we could presumably document that 0+x does the right thing, and make > sure that this is mentioned in the code and tested. > > Bruno > I had the experience recently of checking a complicated trigonometric=20 expression derived, after an embarrassingly long labour, from another=20 complicated trigonometric expression. Had I made a mistake in the=20 working? I evaluated the expressions using l3fp. One, for a number of=20 different parameter values gave 0, the other for the same parameter=20 values gave -0. I concluded, ruefully, that the derivation was correct. To someone, like me, not versed in numerical analysis, the occurrence of=20 signed zero was a surprise. The 0+x trick is good to know and perhaps=20 worth mentioning in the documentation. Andrew