Commit | Line | Data |
---|---|---|
c4ccbbf9 MW |
1 | .\" -*-nroff-*- |
2 | .\" | |
3 | .\" Manual for mathematical definitions | |
4 | .\" | |
5 | .\" (c) 2024 Straylight/Edgeware | |
6 | .\" | |
7 | . | |
8 | .\"----- Licensing notice --------------------------------------------------- | |
9 | .\" | |
10 | .\" This file is part of the mLib utilities library. | |
11 | .\" | |
12 | .\" mLib is free software: you can redistribute it and/or modify it under | |
13 | .\" the terms of the GNU Library General Public License as published by | |
14 | .\" the Free Software Foundation; either version 2 of the License, or (at | |
15 | .\" your option) any later version. | |
16 | .\" | |
17 | .\" mLib is distributed in the hope that it will be useful, but WITHOUT | |
18 | .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
19 | .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public | |
20 | .\" License for more details. | |
21 | .\" | |
22 | .\" You should have received a copy of the GNU Library General Public | |
23 | .\" License along with mLib. If not, write to the Free Software | |
24 | .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
25 | .\" USA. | |
26 | . | |
27 | .\"-------------------------------------------------------------------------- | |
28 | .so ../defs.man \" @@@PRE@@@ | |
29 | . | |
30 | .\"-------------------------------------------------------------------------- | |
31 | .TH math 3mLib "9 March 2024" "Straylight/Edgeware" "mLib utilities library" | |
32 | .\" @NANPN | |
33 | .\" @INFP | |
34 | .\" @NEGP | |
35 | . | |
36 | .\"-------------------------------------------------------------------------- | |
37 | .NAME | |
38 | maths \- mathematical utilities | |
39 | . | |
40 | .\"-------------------------------------------------------------------------- | |
41 | .SH SYNOPSIS | |
42 | . | |
43 | .nf | |
44 | .B "#include <mLib/maths.h>" | |
45 | .PP | |
46 | .BI "int NANP(" floatish " " x ); | |
47 | .BI "int INFP(" floatish " " x ); | |
48 | .BI "int NEGP(" floatish " " x ); | |
49 | .fi | |
50 | . | |
51 | .\"-------------------------------------------------------------------------- | |
52 | .SH DESCRIPTION | |
53 | . | |
54 | The | |
55 | .B <mLib/maths.h> | |
56 | header declares some minor low-level floating-point utilities. | |
57 | These are mostly redundant with C99, | |
58 | but provided for portability to older platforms. | |
59 | .PP | |
60 | The | |
61 | .B NANP | |
62 | macro returns nonzero if its argument is not-a-number. | |
63 | The | |
64 | .B INFP | |
65 | macro returns nonzero if its argument is infinite. | |
66 | The | |
67 | .B NEGP | |
68 | macro returns nonzero if its argument is negative; | |
69 | on IEEE\ 754 platforms with sufficient support, | |
70 | it will correctly detect negative zero. | |
71 | . | |
72 | .\"-------------------------------------------------------------------------- | |
73 | .SH "SEE ALSO" | |
74 | . | |
75 | .BR mLib (3). | |
76 | . | |
77 | .\"-------------------------------------------------------------------------- | |
78 | .SH AUTHOR | |
79 | . | |
80 | Mark Wooding, <mdw@distorted.org.uk> | |
81 | . | |
82 | .\"----- That's all, folks -------------------------------------------------- |