1.\" $NetBSD: fpclassify.3,v 1.3 2008/04/30 13:10:50 martin Exp $ 2.\" 3.\" Copyright (c) 2003 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Klaus Klein. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.Dd January 14, 2004 31.Dt FPCLASSIFY 3 32.Os 33.Sh NAME 34.Nm fpclassify 35.Nd classify real floating type 36.Sh LIBRARY 37.Lb libc 38.Sh SYNOPSIS 39.In math.h 40.Ft int 41.Fn fpclassify "real-floating x" 42.Sh DESCRIPTION 43The 44.Fn fpclassify 45macro performs classification of its argument 46.Fa x . 47An argument represented in a format wider than its semantic type is 48converted to its semantic type first. 49The classification is then based on the type of the argument. 50.Ss IEEE 754 51.Bl -tag -width "FP_SUBNORMALXXX" -compact -offset indent 52.It Dv FP_INFINITE 53infinity, either positive or negative 54.It Dv FP_NAN 55not-a-number 56.Pq Dq NaN 57.It Dv FP_NORMAL 58normal 59.It Dv FP_SUBNORMAL 60subnormal 61.It Dv FP_ZERO 62zero 63.El 64.Ss VAX 65.Bl -tag -width "FP_DIRTYZEROXXX" -compact -offset indent 66.It Dv FP_ROP 67reserved operand 68.Pq Dq ROP 69.It Dv FP_DIRTYZERO 70dirty zero 71.It Dv FP_NORMAL 72finite 73.It Dv FP_ZERO 74true zero 75.El 76.Sh RETURN VALUES 77The 78.Fn fpclassify 79macro returns the value of the number classification macro appropriate 80to its argument 81.Fa x 82as described above. 83.Sh ERRORS 84No errors are defined. 85.Sh SEE ALSO 86.Xr isfinite 3 , 87.Xr isnormal 3 , 88.Xr math 3 , 89.Xr signbit 3 90.Sh STANDARDS 91The 92.Fn fpclassify 93macro conforms to 94.St -isoC-99 . 95