Skip to main content

getExponent (Function)

This function returns the unbiased exponent that is used in the representation of p1. This function wraps the java.lang.Math.getExponent() function.

Syntax

<INT> math:getExponent(<INT|LONG|FLOAT|DOUBLE> p1)

Query Parameters

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1The value of whose unbiased exponent representation should be found.INT LONG FLOAT DOUBLENoYes

Example 1

CREATE STREAM InValueStream (inValue double);

@info(name = 'getExponentValue')
INSERT INTO OutMediationStream
SELECT math:getExponent(inValue) AS expValue
FROM InValueStream;

The query calculates the unbiased exponent of a given input, inValue, from the InValueStream using the math:getExponent() function. The result is directed to the output stream OutMediationStream. For example, getExponent(60984.1) returns 15.