isfinite.gml

来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 43 行

GML
43
字号
.func isfinite
#include <math.h>
int isfinite( x );
.funcend
.*
.desc begin
The &func macro determines whether its argument
.arg x
has a finite value (zero, subnormal, or normal, and not infinite or NaN).
First, an argument represented in a format wider than its semantic type is
converted to its semantic type. Then determination
is based on the type of the argument.
.np
The argument
.arg x
must be an expression of real floating type.
.desc end
.*
.return begin
The &func macro returns a nonzero value if and only if its argument has
a finite value.
.return end
.*
.see begin
.im seefpcls isfinite
.see end
.*
.exmp begin
#include <math.h>
#include <stdio.h>
.exmp break
void main( void )
{
    printf( "zero %s a finite number\n",
        isfinite( 0.0 ) ? "is" : "is not" );
}
.exmp output
zero is a finite number
.exmp end
.*
.class ANSI
.system

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?