@@@ man wip
[mLib] / utils / maths.3
CommitLineData
adec5584
MW
1.\" -*-nroff-*-
2.TH linreg 3 "9 March 2024" "Straylight/Edgeware" "mLib utilities library"
3.\" @NANPN
4.\" @INFP
5.\" @NEGP
6.
7.SH SYNOPSIS
8.nf
9.B "#include <mLib/maths.h>"
10
11.BI "int NANP(" floatish " " x );
12.BI "int INFP(" floatish " " x );
13.BI "int NEGP(" floatish " " x );
14.fi
15.
16.SH DESCRIPTION
17The
18.B <mLib/maths.h>
19header declares some minor low-level floating-point utilities.
20These are mostly redundant with C99,
21but provided for portability to older platforms.
22.PP
23The
24.B NANP
25macro returns nonzero if its argument is not-a-number.
26The
27.B INFP
28macro returns nonzero if its argument is infinite.
29The
30.B NEGP
31macro returns nonzero if its argument is negative;
32on IEEE\ 754 platforms with sufficient support,
33it will correctly detect negative zero.
34.
35.SH AUTHOR
36Mark Wooding, <mdw@distorted.org.uk>