Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id v2B5NHMD013594 for ; Sat, 11 Mar 2017 06:23:18 +0100 Received: from relay2.uni-heidelberg.de ([129.206.119.212]) by mx-ha.gmx.net (mxgmx010 [212.227.15.9]) with ESMTPS (Nemesis) id 0MWwqK-1cjOdX216C-00W059 for ; Sat, 11 Mar 2017 06:23:11 +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 v2B5Liip030216 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Mar 2017 06:21:44 +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 v2AN14BK017008; Sat, 11 Mar 2017 06:21:43 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 15721122 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sat, 11 Mar 2017 06:21:43 +0100 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.119.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id v2B5LhUb006453 for ; Sat, 11 Mar 2017 06:21:43 +0100 Received: from st11p02im-asmtp001.me.com (st11p02im-asmtp001.me.com [17.172.220.113]) by relay2.uni-heidelberg.de (8.15.2/8.15.2) with ESMTPS id v2B5LWYY030125 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA256 bits=256 verify=NO) for ; Sat, 11 Mar 2017 06:21:35 +0100 Received: from process-dkim-sign-daemon.st11p02im-asmtp001.me.com by st11p02im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OMM00100X50MW00@st11p02im-asmtp001.me.com> for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sat, 11 Mar 2017 05:21:32 +0000 (GMT) Received: from icloud.com ([127.0.0.1]) by st11p02im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OMM00N65XJT0I40@st11p02im-asmtp001.me.com> for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sat, 11 Mar 2017 05:21:31 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-11_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1703110045 Content-type: text/plain; charset=utf-8 MIME-version: 1.0 (Mac OS X Mail 9.3 \(3124\)) References: <58C1DA5F.8010109@clear.net.nz> <1b5ec418-2f2d-d39d-af53-a8921d3e8176@gmail.com> X-Mailer: Apple Mail (2.3124) X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id v2B5LhUb006454 Message-ID: <13FBD58A-EF8A-49BD-A9C7-C7DC66A2479D@icloud.com> Date: Fri, 10 Mar 2017 21:21:29 -0800 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Christopher Rowley Subject: Re: Two more (simple) functions for l3fp To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <1b5ec418-2f2d-d39d-af53-a8921d3e8176@gmail.com> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-MIME-Autoconverted: from 8bit to quoted-printable by relay2.uni-heidelberg.de id v2B5Liip030216 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:57m0mu0tf8M=:Dw5Nkg15PHPBJtl0AgYztgo3Wl z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Qo/kUzuT5QbIKbCUxnfvcJY0X5vHfbVhgxXygnRrhbWBjFPwQoKBH oVKy9l9PSyRwtXlEH42FhE3zpNi6kA5PIfsmZKVQT1tB7IGvVdEbGzRq527Rd2Eqqh4Xvto0A AN+1fkrjdY2RPnmKubpFzapp55UC9YdgyRXt+UE7OJNdMQpAJNY3HpExME2J0Z3+fNXobZFqQ owfh4eEFTjvU+wPtk/1Z+G7IMlwxoKv+BC/qB072Ydr X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by h1439878.stratoserver.net id v2B5NHMD013594 Status: R X-Status: X-Keywords: X-UID: 7951 sign may well be a useful function, but hardly much to do with fp. chris > On 10 Mar 2017, at 16:49, Bruno Le Floch wrote: > > On 03/09/2017 05:42 PM, Andrew Parsloe wrote: >> Two functions which I think could be beneficially added to l3fp without >> straining its role as a kernel module (in the way that, say, the gamma >> function would) are the signature function (sgn) and a unit step >> function (Heaviside? -- the difficulty is what value to assign at 0). >> Given the numerical values assigned to true and false in l3fp, it is >> easy to mimic these with simple inequalities (e.g. (#1 > 0) - (#1 < 0) >> for sgn) but perhaps the functions should be there in the first place? >> >> I found myself wanting these when considering a table of fp values where >> it made sense to blank cells containing negative values which "got in >> the way". The code creating the table contained the option of blanking >> zero-value cells, so I multiplied the tabulated formula by 1 - (#1 < 0). >> >> Andrew >> >> --- >> This email has been checked for viruses by Avast antivirus software. >> https://www.avast.com/antivirus > > Will copied your message to https://github.com/latex3/latex3/issues/346 > and replied there that > >> sign() or sgn() definitely makes sense to me, but I’m not sure about >> step() / heaviside() / whatever. Can you give another example for the >> use case there? > > I'm adding sign(). I don't think heaviside is needed: (#1) > 0 ? (#1) : > 0 seems to do what you want pretty nicely. > > What do you think? > > Concerning Gamma, the main reason I haven't implemented it yet is that > it requires determining some magic constants that were only given to me > for a lower precision than what I need (10 digits instead of 16). > > Bruno