isfinite, _finite, _finitef

Determina se um valor de ponto flutuante é finito.

Sintaxe

int isfinite(
   /* floating-point */ x
); /* C-only macro */

template <class FloatingType>
inline bool isfinite(
   FloatingType x
) throw(); /* C++-only template function */

int _finite(
   double x
);

int _finitef(
   float x
); /* x64 and ARM/ARM64 only */

Parameters

x
O valor da vírgula flutuante a testar.

Valor de retorno

A isfinite macro e as _finite funções e _finitef retornam um valor não nulo se x for um valor normal, subnormal ou zero (±0) sinal. Eles retornam 0 se o argumento for infinito ou Não for um Número (NaN). A função isfinite modelo inline em C++ comporta-se da mesma forma, mas retorna true ou false.

Remarks

_finitee _finitef são específicas da Microsoft.

isfinite é uma macro quando compilada em C, e uma função modelo em linha quando compilada em C++.

_finitef está disponível apenas ao compilar para as plataformas x64, ARM, ARM64 ou ARM64EC.

Requisitos

Function Cabeçalho obrigatório (C) Cabeçalho obrigatório (C++)
isfinite <math.h> <math.h> ou <cmath>
_finite <float.h> <float.h> ou <cfloat>
_finitef <math.h> <math.h> ou <cmath>

Para obter mais informações sobre compatibilidade, consulte Compatibilidade.

Consulte também

Suporte matemático e de ponto flutuante
fpclassify
_fpclass, _fpclassf
isinf
isnan, _isnan, _isnanf
isnormal