Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id uB33nBT7022781 for ; Sat, 3 Dec 2016 04:49:12 +0100 Received: from relay2.uni-heidelberg.de ([129.206.119.212]) by mx-ha.gmx.net (mxgmx111 [212.227.17.5]) with ESMTPS (Nemesis) id 0MZh2Y-1by7N13wti-00LXnm for ; Sat, 03 Dec 2016 04:49:06 +0100 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.15.2/8.15.2) with ESMTPS id uB33lj69031054 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 3 Dec 2016 04:47:45 +0100 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 uB31uuCa014026; Sat, 3 Dec 2016 04:47:45 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 14923780 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sat, 3 Dec 2016 04:47:45 +0100 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 uB33ljrJ020806 for ; Sat, 3 Dec 2016 04:47:45 +0100 Received: from mail-qk0-f175.google.com (mail-qk0-f175.google.com [209.85.220.175]) by relay.uni-heidelberg.de (8.15.2/8.15.2) with ESMTPS id uB33lbPi031392 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sat, 3 Dec 2016 04:47:40 +0100 Received: by mail-qk0-f175.google.com with SMTP id q130so111045120qke.1 for ; Fri, 02 Dec 2016 19:47:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=0mnXlG1q3RKaZGQtG4vq1CoPvSaXhu7jnvV890S9rO0=; b=Qpanzrab/OfFFkq7nsy6opEUkAS25voUMzMzBh2YmXIerHJzMnxPoX+rcnrjvoHM8Z VdCz+lpWhQVdkH+cyWKYdcrtBeCkJ+trqvka6UMqDjjd/GY8V5G4YKvZe2m3PkzykciS XMRGv+JmsjUZGoupPNLd/ElKcDg1/ekvZRBzpaujOXtKlzgt4ZVyS4DbBRoAO2DIivbp iIf/hk1h7cvL7Gw2Xmuo379wHM0AHgHko+AyCciuWy8WKHgtzjfOqXpYRbwJjAW8cYYi IOMg7VeMT2Bia6cHMcoLYC3vJoAwOqI3LfO0NMYeZz1tU4WF4bMk5jMuYqiNbBcRI01C UGuw== X-Gm-Message-State: AKaTC03LGzBxI2YwTvHY3eEGkvimQgg5ElDvVWs7ma41XI0FeDvM7LbKqwzrTZz+yEyacQ== X-Received: by 10.55.109.199 with SMTP id i190mr40115092qkc.287.1480736856621; Fri, 02 Dec 2016 19:47:36 -0800 (PST) Received: from [192.168.1.76] (c-69-141-211-196.hsd1.nj.comcast.net. [69.141.211.196]) by smtp.gmail.com with ESMTPSA id i190sm4164277qke.9.2016.12.02.19.47.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Dec 2016 19:47:35 -0800 (PST) References: <584139D8.1000208@clear.net.nz> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Message-ID: <22d44ac9-e01e-ff4d-dbe5-fcca7aa9a4b3@gmail.com> Date: Fri, 2 Dec 2016 22:47:35 -0500 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Bruno Le Floch Subject: Re: Rounding quirk 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:lBwFmIIoehs=:yCYDwPAHqZbVzxMerOBWZmtLYe kl5c/ceOQcS9Ay+X9bD5RpUrdjrOxeM6zuDY7xHpwE+kQ+UH6Wm0c6mHvX7Kq8MzgZCyROEUm nbniv1CBonhB7m3k0Wko99QWzbhRAIsjJD5mXgd8foc8yvPsxnPysYMD5yIMW9K24JvhHO661 Cns3M28wG4Bt3eBiljUtiUmIeExlwF64qS6HJotWjAg3/9IH9pL1VI77QeDt3SnWyq17ZvLUa jt7XYpo0h2NjtcYY00ETmpGgKfEGpPLfHjKhpvn2Za3zLEY8/OhGkq9YNFlDeUi04gBDbOQlZ NJzRjGNNE73mYJBUOoIlK3tTFWcyJeUDW2XHKIMArPQPW4Zs93pUiD6gYXxqmwN+V6LbypDhz BAZJqlB/i1Hzxx4xP3CIv50Jh8NEN37nXiczkGXsEHnal9o8ytYB4g8OoZSSvwa+Y8tm5CWww /aCqm/ZCXPta+w9tbX/K2pCZ52blaq6uWaROW+cy2d+KvfMT7+Anr31yO1RXXHBWHfc2fnqoH ZUR1iho8wUkRQZ+mCzvnOnxblzPViBbaa4pGIZQjm5UH3h+IHysHy8OlBEr0a95CqcNj4NfYD WlS6plAek/yL7SZYHXM/k+swP1ScTGZIzyR4hRC5AzQ0DY9+EUEGBMQofvDMbWnt79A8PpOJ3 nPneXQBoFvhneph1Nn3gun1RsBuRX43CFxFyiDNP85qsZL7ylKbk1BDRnwy9Q2XlOMK4mAJAx 6Sjaye89R3wA3fya9ZQZFO/whWBwuPDwuITr3HG92CmwCwlqNNLH2Y1VvNECq8sYE1ThY5mBP gCo7eGmPyabwqoyg6rkQ38FD79DlVWOekPUbL0g1767w4A2B5v1ncAmIuwtaGpdxbjkhbop4M qaXSsqtDF3Ig0nH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211j8GtmqxR1 duy3+nx9WJW9M83Oxf0iCsSXh12V37VqalshfZM2yd2HghJe44q7Ws7mkOIktjplINey9YMeZ WYXLuUbO+Ldt4GowhSMJ2+BKjy+nkuV0OHdZJCd1GkJcljBG3rFnwDjiQPuTT6206Un+e+630 60pWBiD/yCNEGNgErI4KONpttTmrH8rxKEE0dHJHJpMPqwowjSrCC6/n48FYIddI7SvYMg0je Ql5k4JZdkSXYsBtUs+UN3bMHLw5jLlMYH3LUE4+1dHM/EpBFeUq1UF6OApp1i94tDSoQG7PpZ WON+WRWqCzOvF4ay+oQ+7ZNqRUnmgt1DNZZfLW491/jUu9baMI5i+8KaoitWagFZ54Dnq0HdZ k8/Iny5h3FSEgUCSPSUk8jsp/L7efbao3El6dwSwiR2 X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 7935 On 12/02/2016 09:47 AM, Bruno Le Floch wrote: > On 12/02/2016 04:07 AM, Andrew Parsloe wrote: >> I stumbled on the following quirk recently: >> >> \tl_clear:N \l_tmpa_tl >> \fp_eval:n { round( \l_tmpa_tl, 4) } >> >> gives 4 as the answer (or whatever the rounding value is). Usually, in >> the situation where this arose, \l_tmpa_tl is a string of digits >> possibly including a decimal point. In this instance it was empty. Okay, >> I can check for that, but I wonder if l3fp should do so, and either give >> an error, as >> >> \fp_set:Nn \l_tmpa_fp { \l_tmpa_tl } >> >> does when the token list is empty, or give a conventional 0 as answer? >> >> Andrew > > Thanks, this is a bug. A better behavior would be to throw an error and > give nan. > > This is due to my recent commit adding random number support: to allow > for rand() I did the easiest thing which was to allow and ignore empty > arguments. > > I'll fix it some time this month. > > Best regards, > > Bruno > Fixed in commit r6772. Thanks again, Bruno