Skip to main content

isNan (Function)

This function wraps the java.lang.Float.isNaN() and java.lang.Double.isNaN() functions and returns true if p1 is NaN (Not-a-Number), and returns false if otherwise.

Syntax

<BOOL> math:isNan(<FLOAT|DOUBLE> p1)

Query Parameters

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1The value of the parameter which the function determines to be either NaN or a number.FLOAT DOUBLENoYes

Example 1

CREATE STREAM InValueStream (inValue1 double,inValue2 int);

insert into OutMediationStream
select math:isNan(inValue1) as isNaN
from InValueStream;

If the inValue1 in the input stream has a value that is undefined, then the function considers it as an NaN value and directs True to the output stream, OutMediationStream. For example, isNan(java.lang.Math.log(-12d)) returns true.