42 lines
1.5 KiB
Groff
42 lines
1.5 KiB
Groff
.\" @(#)isinf.3 1.1 92/07/30 SMI; from UCB 4.2
|
|
.TH ISINF 3 "8 August 1985"
|
|
.SH NAME
|
|
isinf, isnan \- test for indeterminate floating-point values
|
|
.SH SYNOPSIS
|
|
.nf
|
|
.B int isinf(value)
|
|
.B double value;
|
|
.LP
|
|
.B int isnan(value)
|
|
.B double value;
|
|
.fi
|
|
.IX "isinf function" "" "\fLisinf\fP \(em test infinite value"
|
|
.IX "isnan function" "" "\fLisnan\fP \(em test not a number"
|
|
.IX "test for indeterminate floating values" "isinf" "" "\fLisinf\fP \(em test infinite value"
|
|
.IX "test for indeterminate floating values" "isnan" "" "\fLisnan\fP \(em test not a number"
|
|
.IX "floating-point" "isinf test infinite value" "" "\fLisinf\fP \(em test infinite value"
|
|
.IX "floating-point" "isnan test not a number" "" "\fLisnan\fP \(em test not a number"
|
|
.IX "indeterminate floating-point values, test for \(em \fLisinf\fR"
|
|
.SH DESCRIPTION
|
|
.I Isinf
|
|
returns a value of 1 if its \fIvalue\fP is an IEEE format infinity
|
|
(two words 0x7ff00000 0x00000000)
|
|
or an IEEE negative infinity, and returns a zero otherwise.
|
|
.LP
|
|
.I Isnan
|
|
returns a value of 1 if its \fIvalue\fP is an IEEE format `not-a-number'
|
|
(two words 0x7ff\|\fInnnnn\fP\|0x\|\fInnnnnnnn\fP)
|
|
where \fIn\fP is not zero) or
|
|
its negative, and returns a zero otherwise.
|
|
.LP
|
|
Some library routines such as
|
|
.IR ecvt (3)
|
|
do not handle indeterminate floating-point values gracefully.
|
|
Prospective arguments to such routines should be checked with
|
|
\fIisinf\fP or \fIisnan\fP before calling these routines.
|
|
.LP
|
|
The
|
|
.I
|
|
Floating-Point Programmer's Guide for the Sun Workstation
|
|
gives details for the format of IEEE standard floating-point.
|