API Docs - v4.0.20
Math
percentile (Aggregate Function)
Returns the pth percentile value of the argument values.
Syntax
<DOUBLE> math:percentile(<INT|LONG|FLOAT|DOUBLE> arg, <DOUBLE> p)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
arg | The values of which the percentile should be found | INT LONG FLOAT DOUBLE |
No | No | |
p | Estimate of which percentile to be found (pth percentile) where p is any number greater than 0 or less than or equal to 100 | DOUBLE | No | No |
Examples EXAMPLE 1
define stream InValueStream (sensorId int, temperature double);
from InValueStream
select math:percentile(temperature, 97.0) as percentile
insert into OutMediationStream;
math:percentile(temperature, 97.0)
abs (Function)
Returns the absolute value of the given parameter. This function wraps the java.lang.Math.abs()
function.
Syntax
<DOUBLE> math:abs(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of which the absolute value should be found | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:abs(inValue) as absValue
insert into OutMediationStream;
Both abs(3) and abs(-3) queries return 3 since the absolute value of both 3 and -3 is 3.
acos (Function)
If -1 <= p1 <= 1, returns the arc-cosine (inverse cosine) of p1. If not, it returns NULL. The returned value is in radian scale. This function wraps the java.lang.Math.acos()function.
Syntax
<DOUBLE> math:acos(<FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of which the arc-cosine (inverse cosine) should be found | FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:acos(inValue) as acosValue
insert into OutMediationStream;
acos(0.5) returns 1.0471975511965979.
asin (Function)
If -1 <= p1 <= 1, returns the arc-sin (inverse sine) of p1. If not, it returns NULL. The returned value is in radian scale. This function wraps the java.lang.Math.asin() function.
Syntax
<DOUBLE> math:asin(<FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of which the arc-sin (inverse sine) should be found | FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:asin(inValue) as asinValue
insert into OutMediationStream;
asin(0.5) returns 0.5235987755982989.
atan (Function)
1. If a single p1
is received, returns the arc-tangent (inverse tangent) of p1
.
2. If p1
is received along with an optional p1
, considers them as x,y coordinates and returnsthe respective arc-tangent (inverse tangent) of the p1
, p2
coordinates.
3.The returned value is in radian scale. This function wraps the java.lang.Math.atan()
function.
Syntax
<DOUBLE> math:atan(<INT|LONG|FLOAT|DOUBLE> p1, <INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of which the arc-tangent (inverse tangent) should be found. If the optional second parameter is given this represents the x coordinate of the (x,y) coordinate pair | INT LONG FLOAT DOUBLE |
No | No | |
p1 | This optional parameter represents the y coordinate of the (x,y) coordinate pair | 0D | INT LONG FLOAT DOUBLE |
Yes | No |
Examples EXAMPLE 1
define stream InValueStream (inValue1 double, inValue2 double);
from InValueStream
select math:atan(inValue1, inValue2) as convertedValue
insert into OutMediationStream;
atan(12d, 5d) returns 1.1760052070951352.
bin (Function)
Returns a string representation of the integer/long p1
argument as an unsigned integer in base 2. This function wraps the java.lang.Integer.toBinaryString
and java.lang.Long.toBinaryString
methods.
Syntax
<STRING> math:bin(<INT|LONG> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value that should be converted to an unsigned integer of base 2 | INT LONG |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue long);
from InValueStream
select math:bin(inValue) as binValue
insert into OutMediationStream;
bin(9) returns "1001".
cbrt (Function)
Returns the cube-root of p1 that is in radians. This function wraps the java.lang.Math.cbrt()
function.
Syntax
<DOUBLE> math:cbrt(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of whose cube-root should be found. Input must be in radians | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:cbrt(inValue) as cbrtValue
insert into OutMediationStream;
cbrt(17d) returns 2.5712815906582356.
ceil (Function)
Returns the smallest (closest to negative infinity) double value that is greater than or equal to the p1
argument, and is equal to a mathematical integer. This function wraps thejava.lang.Math.ceil()
method.
Syntax
<DOUBLE> math:ceil(<FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of whose ceiling value should be found | FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:ceil(inValue) as ceilingValue
insert into OutMediationStream;
ceil(423.187d) returns 424.0.
conv (Function)
Converts a
from the fromBase
base to the toBase
base.
Syntax
<STRING> math:conv(<STRING> a, <INT> from.base, <INT> to.base)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
a | The value whose base should be changed. Input should be as a String | STRING | No | No | |
from.base | The source base of the input parameter 'a' | INT | No | No | |
to.base | The target base that input parameter 'a' should be converted to | INT | No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue string,fromBase int,toBase int);
from InValueStream
select math:conv(inValue,fromBase,toBase) as convertedValue
insert into OutMediationStream;
conv("7f", 16, 10) returns "127".
copySign (Function)
Returs a value with the received magnitude
and the sign
. This function wraps the java.lang.Math.copySign()
function.
Syntax
<DOUBLE> math:copySign(<INT|LONG|FLOAT|DOUBLE> magnitude, <INT|LONG|FLOAT|DOUBLE> sign)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
magnitude | This parameters magnitude will be used for output attribute | INT LONG FLOAT DOUBLE |
No | No | |
sign | This parameters sign will be used for output attribute | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue1 double, inValue2 double);
from InValueStream
select math:copySign(inValue1,inValue2) as copysignValue
insert into OutMediationStream;
copySign(5.6d, -3.0d) returns -5.6.
cos (Function)
Returns the cosine of p1
that is in radians. This function wraps the java.lang.Math.cos()
function.
Syntax
<DOUBLE> math:cos(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of whose cosine value should be found. Input must be in radians | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:cos(inValue) as cosValue
insert into OutMediationStream;
cos(6d) returns 0.9601702866503661.
cosh (Function)
Returns the hyperbolic cosine of p1
that is in radians. This function wraps the java.lang.Math.cosh()
function.
Syntax
<DOUBLE> math:cosh(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of whose hyperbolic cosine should be found. Input must be in radians | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:cosh(inValue) as cosValue
insert into OutMediationStream;
cosh (6d) returns 201.7156361224559.
e (Function)
Returns the java.lang.Math.E
constant, which is the closest double value to e, which is the base of the natural logarithms.
Syntax
<DOUBLE> math:e()
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:e() as eValue
insert into OutMediationStream;
e() returns 2.7182818284590452354.
exp (Function)
Returns the Euler's number e
raised to the power of p1
. This function wraps the java.lang.Math.exp()
function.
Syntax
<DOUBLE> math:exp(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The power that the Euler's number e should be raised to | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:exp(inValue) as expValue
insert into OutMediationStream;
exp(10.23) returns 27722.51006805505.
floor (Function)
This function wraps the java.lang.Math.floor()
function, which returns the largest (closest to positive infinity) value that is less that or equal to p1
, and is equal to a mathematical integer.
Syntax
<DOUBLE> math:floor(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of whose floor value should be found | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:floor(inValue) as floorValue
insert into OutMediationStream;
floor(10.23) returns 10.0.
getExponent (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
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of whose unbiased exponent representation should be found | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:getExponent(inValue) as expValue
insert into OutMediationStream;
getExponent(60984.1) returns 15.
hex (Function)
Wraps the java.lang.Double.toHexString()
function that returns a hexadecimal string representation of p1
.
Syntax
<STRING> math:hex(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of whose hexadecimal representation should be found | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue int);
from InValueStream
select math:hex(inValue) as hexString
insert into OutMediationStream;
hex(200) returns "c8".
isInfinite (Function)
Wraps the java.lang.Float.isInfinite()
and java.lang.Double.isInfinite()
functions and returns true
if p1
is infinitely large in magnitude and returns false
if otherwise.
Syntax
<BOOL> math:isInfinite(<FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value that should be checked if infinite | FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue1 double,inValue2 int);
from InValueStream
select math:isInfinite(inValue1) as isInfinite
insert into OutMediationStream;
isInfinite(java.lang.Double.POSITIVE_INFINITY) returns true.
isNan (Function)
Wraps the java.lang.Float.isNaN()
and java.lang.Double.isNaN()
functions and returns true
if p1
is a NaN (Not-a-Number) value, and returns false
if otherwise.
Syntax
<BOOL> math:isNan(<FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value that should be checked if it is a number | FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue1 double,inValue2 int);
from InValueStream
select math:isNan(inValue1) as isNaN
insert into OutMediationStream;
isNan(java.lang.Math.log(-12d)) returns true.
ln (Function)
Returns the natural logarithm (base e) of p1
.
Syntax
<DOUBLE> math:ln(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of whose natural logarithm (base e) should be found | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:ln(inValue) as lnValue
insert into OutMediationStream;
ln(11.453) returns 2.438251704415579.
log (Function)
Returns the logarithm of the received number
as per the given base
.
Syntax
<DOUBLE> math:log(<INT|LONG|FLOAT|DOUBLE> number, <INT|LONG|FLOAT|DOUBLE> base)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
number | The value of whose base should be changed | INT LONG FLOAT DOUBLE |
No | No | |
base | The base value of the ouput | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (number double, base double);
from InValueStream
select math:log(number, base) as logValue
insert into OutMediationStream;
log(34, 2f) returns 5.08746284125034.
log10 (Function)
Returns the base 10 logarithm of p1
.
Syntax
<DOUBLE> math:log10(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of whose base 10 logarithm should be found. | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:log10(inValue) as lnValue
insert into OutMediationStream;
log10(19.234) returns 1.2840696117100832.
log2 (Function)
Returns the base 2 logarithm of p1
.
Syntax
<DOUBLE> math:log2(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of whose base 2 logarithm should be found. | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:log2(inValue) as lnValue
insert into OutMediationStream;
log2(91d) returns 6.507794640198696.
max (Function)
Returns the greater value out of p1
and p2
.
Syntax
<DOUBLE> math:max(<INT|LONG|FLOAT|DOUBLE> p1, <INT|LONG|FLOAT|DOUBLE> p2)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | Value one to be compared in finding largest value | INT LONG FLOAT DOUBLE |
No | No | |
p2 | Value two to be compared in finding largest value | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue1 double,inValue2 int);
from InValueStream
select math:max(inValue1,inValue2) as maxValue
insert into OutMediationStream;
max(123.67d, 91) returns 123.67.
min (Function)
Returns the smaller value out of p1
and p2
.
Syntax
<DOUBLE> math:min(<INT|LONG|FLOAT|DOUBLE> p1, <INT|LONG|FLOAT|DOUBLE> p2)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | Value one to be compared in finding smallest value | INT LONG FLOAT DOUBLE |
No | No | |
p2 | Value two to be compared in finding smallest value | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue1 double,inValue2 int);
from InValueStream
select math:min(inValue1,inValue2) as minValue
insert into OutMediationStream;
min(123.67d, 91) returns 91.
oct (Function)
Converts p1
to octal.
Syntax
<STRING> math:oct(<INT|LONG> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of whose octal representation should be found. | INT LONG |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue long);
from InValueStream
select math:oct(inValue) as octValue
insert into OutMediationStream;
oct(99l) returns "143".
parseDouble (Function)
Returns the double value of the received string.
Syntax
<DOUBLE> math:parseDouble(<STRING> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value that should be converted to a double | STRING | No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue string);
from InValueStream
select math:parseDouble(inValue) as output
insert into OutMediationStream;
parseDouble("123") returns 123.0.
parseFloat (Function)
Returns the float value of the received string.
Syntax
<FLOAT> math:parseFloat(<STRING> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value that should be converted to a float | STRING | No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue string);
from InValueStream
select math:parseFloat(inValue) as output
insert into OutMediationStream;
parseFloat("123") returns 123.0.
parseInt (Function)
Returns the integer value of the received string.
Syntax
<INT> math:parseInt(<STRING> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value that should be converted to a int | STRING | No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue string);
from InValueStream
select math:parseInt(inValue) as output
insert into OutMediationStream;
parseInt("123") returns 123.
parseLong (Function)
Returns the long value of the received string.
Syntax
<LONG> math:parseLong(<STRING> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value that should be converted to a long | STRING | No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue string);
from InValueStream
select math:parseLong(inValue) as output
insert into OutMediationStream;
parseLong("123") returns 123.
pi (Function)
Returns the java.lang.Math.PI
constant, which is the closest value to pi, i.e., the ratio of the circumference of a circle to its diameter.
Syntax
<DOUBLE> math:pi()
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:pi() as piValue
insert into OutMediationStream;
pi() always returns 3.141592653589793.
power (Function)
Returns a value by raising to the given power.
Syntax
<DOUBLE> math:power(<INT|LONG|FLOAT|DOUBLE> value, <INT|LONG|FLOAT|DOUBLE> to.power)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
value | The value that should be raised to the power of 'to.power' input parameter | INT LONG FLOAT DOUBLE |
No | No | |
to.power | The power that 'value' input parameter should be raised to | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue1 double, inValue2 double);
from InValueStream
select math:power(inValue1,inValue2) as powerValue
insert into OutMediationStream;
power(5.6d, 3.0d) returns 175.61599999999996.
rand (Function)
Returns a stream of pseudo-random numbers when a sequence of calls are sent to the rand()
. Optionally, it is possible to define a seed, i.e., rand(seed)
using which the pseudo-random numbers are generated. These functions use the java.util.Random
class internally.
Syntax
<DOUBLE> math:rand(<INT|LONG> seed)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
seed | An optional seed value that will be used to generate the random number sequence | defaultSeed | INT LONG |
Yes | No |
Examples EXAMPLE 1
define stream InValueStream (symbol string, price long, volume long);
from InValueStream select symbol, math:rand() as randNumber
select math:oct(inValue) as octValue
insert into OutMediationStream;
A random double value between 0 and 1 will be generated using math:rand()
round (Function)
Returns the closest integer/long value depending on the input argument.
Syntax
<INT|LONG> math:round(<FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value that should be rounded to the closest integer/long. | FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:round(inValue) as roundValue
insert into OutMediationStream;
round(3252.353) returns 3252.
signum (Function)
Returns +1, 0, or -1 for the given positive, zero, and negative values respectively. This function wraps the java.lang.Math.signum()
function.
Syntax
<INT> math:signum(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value that should be checked if positive or negative or otherwise | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:signum(inValue) as sign
insert into OutMediationStream;
signum(-6.32d) returns -1.
sin (Function)
Returns the sine of the value given in radians. This function wraps the java.lang.Math.sin()
function.
Syntax
<DOUBLE> math:sin(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of whose sine value should be found. Input should be in radians | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:sin(inValue) as sinValue
insert into OutMediationStream;
sin(6d) returns -0.27941549819892586.
sinh (Function)
Returns the hyperbolic sine of the value given in radians. This function wraps the java.lang.Math.sinh()
function.
Syntax
<DOUBLE> math:sinh(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of whose hyperbolic sine value should be found. Input should be in radians | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:sinh(inValue) as sinhValue
insert into OutMediationStream;
sinh(6d) returns 201.71315737027922.
sqrt (Function)
Returns the square-root of the given value. This function wraps the java.lang.Math.sqrt()
s function.
Syntax
<DOUBLE> math:sqrt(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of whose square-root value should be found. | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:sqrt(inValue) as sqrtValue
insert into OutMediationStream;
sqrt(4d) returns 2.
tan (Function)
Returns the tan of the given value in radians. This function wraps the java.lang.Math.tan()
function.
Syntax
<DOUBLE> math:tan(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of whose tan value should be found. Input should be in radians | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:tan(inValue) as tanValue
insert into OutMediationStream;
tan(6d) returns -0.29100619138474915.
tanh (Function)
Returns the hyperbolic tangent of the value given in radians. This function wraps the java.lang.Math.tanh()
function.
Syntax
<DOUBLE> math:tanh(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The value of whose hyperbolic tangent value should be found. Input should be in radians | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:tanh(inValue) as tanhValue
insert into OutMediationStream;
tanh(6d) returns 0.9999877116507956.
toDegrees (Function)
Converts the value given in radians to degrees. This function wraps the java.lang.Math.toDegrees()
function.
Syntax
<DOUBLE> math:toDegrees(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The radians value that should be converted to degrees | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:toDegrees(inValue) as degreesValue
insert into OutMediationStream;
toDegrees(6d) returns 343.77467707849394.
toRadians (Function)
Converts the value given in degrees to radians. This function wraps the java.lang.Math.toRadians()
function.
Syntax
<DOUBLE> math:toRadians(<INT|LONG|FLOAT|DOUBLE> p1)
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
p1 | The degrees value that should be converted to radians | INT LONG FLOAT DOUBLE |
No | No |
Examples EXAMPLE 1
define stream InValueStream (inValue double);
from InValueStream
select math:toRadians(inValue) as radiansValue
insert into OutMediationStream;
toRadians(6d) returns 0.10471975511965977.