Name

isnan, isinf, isfinite, isnormal, signbit — IEEE 754 floating-point classification functions

Synopsis

isnan( in x double precision);
 
signbit( in x double precision);
 
isinf( in x double precision);
 
isfinite( in x double precision);
 
isnormal( in x double precision);
 

Description

These functions classify an IEEE 754 double precision floating point value. Each returns an integer 1 if the predicate holds for x, 0 otherwise.

:  isnan	1 if x is a NaN (Not-a-Number), 0 otherwise.
:  isinf	1 if x is positive or negative infinity, 0 otherwise.
:  isfinite	1 if x is neither infinity nor NaN, 0 otherwise.
:  isnormal	1 if x is a normal (non-zero, non-subnormal, non-infinity, non-NaN) value.
:  signbit	1 if the IEEE 754 sign bit of x is set (i.e. x is negative, including -0.0), 0 otherwise.
    

See also isfinitenumeric for the SQL-level check that combines type and finite-value testing across any numeric type.

Return Types

integer (0 or 1).

Examples

Example 24.125. Simple Examples

SQL> select isnan (0.0/0.0), isinf (1.0/0.0), isfinite (1.0), isnormal (1e-310);
      


© 1992 - OpenLink Software. All rights reserved.

Making Technology Work for You®