LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Andrew Parsloe <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Fri, 10 Mar 2017 11:42:39 +1300
Content-Type:
text/plain
Parts/Attachments:
text/plain (19 lines)
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

ATOM RSS1 RSS2