From 744c5c2e646a905a9d561574942a1509ba2a17f7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 27 Sep 2019 16:48:20 +0000 Subject: [PATCH] [WSO2-Release] [Release 5.0.4] update documentation for release 5.0.4 --- README.md | 86 +-- docs/api/5.0.4.md | 1763 ++++++++++++++++++++++++++++++++++++++++++++ docs/api/latest.md | 564 ++++++++------ docs/index.md | 90 +-- mkdocs.yml | 1 + 5 files changed, 2197 insertions(+), 307 deletions(-) create mode 100644 docs/api/5.0.4.md diff --git a/README.md b/README.md index 468bbb5..12527b1 100644 --- a/README.md +++ b/README.md @@ -19,52 +19,52 @@ For information on Siddhi and i ## Latest API Docs -Latest API Docs is 5.0.3. +Latest API Docs is 5.0.4. ## Features -* percentile *(Aggregate Function)*

This functions returns the pth percentile value of a given argument.

-* abs *(Function)*

This function returns the absolute value of the given parameter. It wraps the java.lang.Math.abs() function.

-* acos *(Function)*

If -1 <= p1 <= 1, this function returns the arc-cosine (inverse cosine) value of p1.If the domain is invalid, it returns NULL. The value returned is in radian scale. This function wraps the java.lang.Math.acos() function.

-* asin *(Function)*

If -1 <= p1 <= 1, this function returns the arc-sin (inverse sine) value of p1. If the domain is invalid, it returns NULL. The value returned is in radian scale. This function wraps the java.lang.Math.asin() function.

-* atan *(Function)*

1. If a single p1 is received, this function returns the arc-tangent (inverse tangent) value of p1.
2. If p1 is received along with an optional p1, it considers them as x and y coordinates and returns the arc-tangent (inverse tangent) value.
The returned value is in radian scale. This function wraps the java.lang.Math.atan() function.

-* bin *(Function)*

This function returns a string representation of the p1 argument, that is of either 'integer' or 'long' data type, as an unsigned integer in base 2. It wraps the java.lang.Integer.toBinaryString and java.lang.Long.toBinaryString` methods.

-* cbrt *(Function)*

This function returns the cube-root of 'p1' which is in radians. It wraps the java.lang.Math.cbrt() function.

-* ceil *(Function)*

This function returns the smallest double value, i.e., the closest to the negative infinity, that is greater than or equal to the p1 argument, and is equal to a mathematical integer. It wraps the java.lang.Math.ceil() method.

-* conv *(Function)*

This function converts a from the fromBase base to the toBase base.

-* copySign *(Function)*

This function returns a value of an input with the received magnitude and sign of another input. It wraps the java.lang.Math.copySign() function.

-* cos *(Function)*

This function returns the cosine of p1 which is in radians. It wraps the java.lang.Math.cos() function.

-* cosh *(Function)*

This function returns the hyperbolic cosine of p1 which is in radians. It wraps the java.lang.Math.cosh() function.

-* e *(Function)*

This function returns the java.lang.Math.E constant, which is the closest double value to e, where e is the base of the natural logarithms.

-* exp *(Function)*

This function returns the Euler's number e raised to the power of p1. It wraps the java.lang.Math.exp() function.

-* floor *(Function)*

This function wraps the java.lang.Math.floor() function and returns the largest value, i.e., closest to the positive infinity, that is less than or equal to p1, and is equal to a mathematical integer.

-* 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.

-* hex *(Function)*

This function wraps the java.lang.Double.toHexString() function. It returns a hexadecimal string representation of the input, p1`.

-* isInfinite *(Function)*

This function wraps the java.lang.Float.isInfinite() and java.lang.Double.isInfinite() and returns true if p1 is infinitely large in magnitude and false if otherwise.

-* 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.

-* ln *(Function)*

This function returns the natural logarithm (base e) of p1.

-* log *(Function)*

This function returns the logarithm of the received number as per the given base.

-* log10 *(Function)*

This function returns the base 10 logarithm of p1.

-* log2 *(Function)*

This function returns the base 2 logarithm of p1.

-* max *(Function)*

This function returns the greater value of p1 and p2.

-* min *(Function)*

This function returns the smaller value of p1 and p2.

-* oct *(Function)*

This function converts the input parameter p1 to octal.

-* parseDouble *(Function)*

This function returns the double value of the string received.

-* parseFloat *(Function)*

This function returns the float value of the received string.

-* parseInt *(Function)*

This function returns the integer value of the received string.

-* parseLong *(Function)*

This function returns the long value of the string received.

-* pi *(Function)*

This 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.

-* power *(Function)*

This function raises the given value to a given power.

-* rand *(Function)*

This 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 internally use the java.util.Random class.

-* round *(Function)*

This function returns the value of the input argument rounded off to the closest integer/long value.

-* signum *(Function)*

This returns +1, 0, or -1 for the given positive, zero and negative values respectively. This function wraps the java.lang.Math.signum() function.

-* sin *(Function)*

This returns the sine of the value given in radians. This function wraps the java.lang.Math.sin() function.

-* sinh *(Function)*

This returns the hyperbolic sine of the value given in radians. This function wraps the java.lang.Math.sinh() function.

-* sqrt *(Function)*

This function returns the square-root of the given value. It wraps the java.lang.Math.sqrt()s function.

-* tan *(Function)*

This function returns the tan of the given value in radians. It wraps the java.lang.Math.tan() function.

-* tanh *(Function)*

This function returns the hyperbolic tangent of the value given in radians. It wraps the java.lang.Math.tanh() function.

-* toDegrees *(Function)*

This function converts the value given in radians to degrees. It wraps the java.lang.Math.toDegrees() function.

-* toRadians *(Function)*

This function converts the value given in degrees to radians. It wraps the java.lang.Math.toRadians() function.

+* percentile *(Aggregate Function)*

This functions returns the pth percentile value of a given argument.

+* abs *(Function)*

This function returns the absolute value of the given parameter. It wraps the java.lang.Math.abs() function.

+* acos *(Function)*

If -1 <= p1 <= 1, this function returns the arc-cosine (inverse cosine) value of p1.If the domain is invalid, it returns NULL. The value returned is in radian scale. This function wraps the java.lang.Math.acos() function.

+* asin *(Function)*

If -1 <= p1 <= 1, this function returns the arc-sin (inverse sine) value of p1. If the domain is invalid, it returns NULL. The value returned is in radian scale. This function wraps the java.lang.Math.asin() function.

+* atan *(Function)*

1. If a single p1 is received, this function returns the arc-tangent (inverse tangent) value of p1.
2. If p1 is received along with an optional p1, it considers them as x and y coordinates and returns the arc-tangent (inverse tangent) value.
The returned value is in radian scale. This function wraps the java.lang.Math.atan() function.

+* bin *(Function)*

This function returns a string representation of the p1 argument, that is of either 'integer' or 'long' data type, as an unsigned integer in base 2. It wraps the java.lang.Integer.toBinaryString and java.lang.Long.toBinaryString` methods.

+* cbrt *(Function)*

This function returns the cube-root of 'p1' which is in radians. It wraps the java.lang.Math.cbrt() function.

+* ceil *(Function)*

This function returns the smallest double value, i.e., the closest to the negative infinity, that is greater than or equal to the p1 argument, and is equal to a mathematical integer. It wraps the java.lang.Math.ceil() method.

+* conv *(Function)*

This function converts a from the fromBase base to the toBase base.

+* copySign *(Function)*

This function returns a value of an input with the received magnitude and sign of another input. It wraps the java.lang.Math.copySign() function.

+* cos *(Function)*

This function returns the cosine of p1 which is in radians. It wraps the java.lang.Math.cos() function.

+* cosh *(Function)*

This function returns the hyperbolic cosine of p1 which is in radians. It wraps the java.lang.Math.cosh() function.

+* e *(Function)*

This function returns the java.lang.Math.E constant, which is the closest double value to e, where e is the base of the natural logarithms.

+* exp *(Function)*

This function returns the Euler's number e raised to the power of p1. It wraps the java.lang.Math.exp() function.

+* floor *(Function)*

This function wraps the java.lang.Math.floor() function and returns the largest value, i.e., closest to the positive infinity, that is less than or equal to p1, and is equal to a mathematical integer.

+* 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.

+* hex *(Function)*

This function wraps the java.lang.Double.toHexString() function. It returns a hexadecimal string representation of the input, p1`.

+* isInfinite *(Function)*

This function wraps the java.lang.Float.isInfinite() and java.lang.Double.isInfinite() and returns true if p1 is infinitely large in magnitude and false if otherwise.

+* 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.

+* ln *(Function)*

This function returns the natural logarithm (base e) of p1.

+* log *(Function)*

This function returns the logarithm of the received number as per the given base.

+* log10 *(Function)*

This function returns the base 10 logarithm of p1.

+* log2 *(Function)*

This function returns the base 2 logarithm of p1.

+* max *(Function)*

This function returns the greater value of p1 and p2.

+* min *(Function)*

This function returns the smaller value of p1 and p2.

+* oct *(Function)*

This function converts the input parameter p1 to octal.

+* parseDouble *(Function)*

This function returns the double value of the string received.

+* parseFloat *(Function)*

This function returns the float value of the received string.

+* parseInt *(Function)*

This function returns the integer value of the received string.

+* parseLong *(Function)*

This function returns the long value of the string received.

+* pi *(Function)*

This 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.

+* power *(Function)*

This function raises the given value to a given power.

+* rand *(Function)*

This 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 internally use the java.util.Random class.

+* round *(Function)*

This function returns the value of the input argument rounded off to the closest integer/long value.

+* signum *(Function)*

This returns +1, 0, or -1 for the given positive, zero and negative values respectively. This function wraps the java.lang.Math.signum() function.

+* sin *(Function)*

This returns the sine of the value given in radians. This function wraps the java.lang.Math.sin() function.

+* sinh *(Function)*

This returns the hyperbolic sine of the value given in radians. This function wraps the java.lang.Math.sinh() function.

+* sqrt *(Function)*

This function returns the square-root of the given value. It wraps the java.lang.Math.sqrt()s function.

+* tan *(Function)*

This function returns the tan of the given value in radians. It wraps the java.lang.Math.tan() function.

+* tanh *(Function)*

This function returns the hyperbolic tangent of the value given in radians. It wraps the java.lang.Math.tanh() function.

+* toDegrees *(Function)*

This function converts the value given in radians to degrees. It wraps the java.lang.Math.toDegrees() function.

+* toRadians *(Function)*

This function converts the value given in degrees to radians. It wraps the java.lang.Math.toRadians() function.

## Dependencies diff --git a/docs/api/5.0.4.md b/docs/api/5.0.4.md new file mode 100644 index 0000000..570e49a --- /dev/null +++ b/docs/api/5.0.4.md @@ -0,0 +1,1763 @@ +# API Docs - v5.0.4 + +!!! Info "Tested Siddhi Core version: *5.1.5*" + It could also support other Siddhi Core minor versions. + +## Math + +### percentile *(Aggregate Function)* +

+

This functions returns the pth percentile value of a given argument.

+

+Syntax + +``` + math:percentile( arg, p) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
arg

The value of the parameter whose percentile should be found.

INT
LONG
FLOAT
DOUBLE
NoYes
p

Estimate of the percentile to be found (pth percentile) where p is any number greater than 0 or lesser than or equal to 100.

DOUBLENoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (sensorId int, temperature double); +from InValueStream +select math:percentile(temperature, 97.0) as percentile +insert into OutMediationStream; +``` +

+

This function returns the percentile value based on the argument given. For example, math:percentile(temperature, 97.0) returns the 97th percentile value of all the temperature events.

+

+### abs *(Function)* +

+

This function returns the absolute value of the given parameter. It wraps the java.lang.Math.abs() function.

+

+Syntax + +``` + math:abs( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The parameter whose absolute value is found.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:abs(inValue) as absValue +insert into OutMediationStream; +``` +

+

Irrespective of whether the 'invalue' in the input stream holds a value of abs(3) or abs(-3),the function returns 3 since the absolute value of both 3 and -3 is 3. The result directed to OutMediationStream stream.

+

+### acos *(Function)* +

+

If -1 <= p1 <= 1, this function returns the arc-cosine (inverse cosine) value of p1.If the domain is invalid, it returns NULL. The value returned is in radian scale. This function wraps the java.lang.Math.acos() function.

+

+Syntax + +``` + math:acos( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose arc-cosine (inverse cosine) value is found.

FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:acos(inValue) as acosValue +insert into OutMediationStream; +``` +

+

If the 'inValue' in the input stream is given, the function calculates the arc-cosine value of it and returns the arc-cosine value to the output stream, OutMediationStream. For example, acos(0.5) returns 1.0471975511965979.

+

+### asin *(Function)* +

+

If -1 <= p1 <= 1, this function returns the arc-sin (inverse sine) value of p1. If the domain is invalid, it returns NULL. The value returned is in radian scale. This function wraps the java.lang.Math.asin() function.

+

+Syntax + +``` + math:asin( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose arc-sin (inverse sine) value is found.

FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:asin(inValue) as asinValue +insert into OutMediationStream; +``` +

+

If the 'inValue' in the input stream is given, the function calculates the arc-sin value of it and returns the arc-sin value to the output stream, OutMediationStream. For example, asin(0.5) returns 0.5235987755982989.

+

+### atan *(Function)* +

+

1. If a single p1 is received, this function returns the arc-tangent (inverse tangent) value of p1.
2. If p1 is received along with an optional p1, it considers them as x and y coordinates and returns the arc-tangent (inverse tangent) value.
The returned value is in radian scale. This function wraps the java.lang.Math.atan() function.

+

+Syntax + +``` + math:atan( p1) + math:atan( p1, p2) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose arc-tangent (inverse tangent) is found. If the optional second parameter is given this represents the x coordinate of the (x,y) coordinate pair.

INT
LONG
FLOAT
DOUBLE
NoYes
p2

This optional parameter represents the y coordinate of the (x,y) coordinate pair.

0DINT
LONG
FLOAT
DOUBLE
YesYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue1 double, inValue2 double); +from InValueStream +select math:atan(inValue1, inValue2) as convertedValue +insert into OutMediationStream; +``` +

+

If the 'inValue1' in the input stream is given, the function calculates the arc-tangent value of it and returns the arc-tangent value to the output stream, OutMediationStream. If both the 'inValue1' and 'inValue2' are given, then the function considers them to be x and y coordinates respectively and returns the calculated arc-tangent value to the output stream, OutMediationStream. For example, atan(12d, 5d) returns 1.1760052070951352.

+

+### bin *(Function)* +

+

This function returns a string representation of the p1 argument, that is of either 'integer' or 'long' data type, as an unsigned integer in base 2. It wraps the java.lang.Integer.toBinaryString and java.lang.Long.toBinaryString` methods.

+

+Syntax + +``` + math:bin( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value in either 'integer' or 'long', that should be converted into an unsigned integer of base 2.

INT
LONG
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue long); +from InValueStream +select math:bin(inValue) as binValue +insert into OutMediationStream; +``` +

+

If the 'inValue' in the input stream is given, the function converts it into an unsigned integer in base 2 and directs the output to the output stream, OutMediationStream. For example, bin(9) returns '1001'.

+

+### cbrt *(Function)* +

+

This function returns the cube-root of 'p1' which is in radians. It wraps the java.lang.Math.cbrt() function.

+

+Syntax + +``` + math:cbrt( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose cube-root should be found. Input is required to be in radians.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:cbrt(inValue) as cbrtValue +insert into OutMediationStream; +``` +

+

If the 'inValue' is given, the function calculates the cube-root value for the same and directs the output to the output stream, OutMediationStream. For example, cbrt(17d) returns 2.5712815906582356.

+

+### ceil *(Function)* +

+

This function returns the smallest double value, i.e., the closest to the negative infinity, that is greater than or equal to the p1 argument, and is equal to a mathematical integer. It wraps the java.lang.Math.ceil() method.

+

+Syntax + +``` + math:ceil( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose ceiling value is found.

FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:ceil(inValue) as ceilingValue +insert into OutMediationStream; +``` +

+

This function calculates the ceiling value of the given 'inValue' and directs the result to 'OutMediationStream' output stream. For example, ceil(423.187d) returns 424.0.

+

+### conv *(Function)* +

+

This function converts a from the fromBase base to the toBase base.

+

+Syntax + +``` + math:conv( a, from.base, to.base) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
a

The value whose base should be changed. Input should be given as a 'String'.

STRINGNoYes
from.base

The source base of the input parameter 'a'.

INTNoYes
to.base

The target base that the input parameter 'a' should be converted into.

INTNoYes
+ +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; +``` +

+

If the 'inValue' in the input stream is given, and the base in which it currently resides in and the base to which it should be converted to is specified, the function converts it into a string in the target base and directs it to the output stream, OutMediationStream. For example, conv("7f", 16, 10) returns "127".

+

+### copySign *(Function)* +

+

This function returns a value of an input with the received magnitude and sign of another input. It wraps the java.lang.Math.copySign() function.

+

+Syntax + +``` + math:copySign( magnitude, sign) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
magnitude

The magnitude of this parameter is used in the output attribute.

INT
LONG
FLOAT
DOUBLE
NoYes
sign

The sign of this parameter is used in the output attribute.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue1 double, inValue2 double); +from InValueStream +select math:copySign(inValue1,inValue2) as copysignValue +insert into OutMediationStream; +``` +

+

If two values are provided as 'inValue1' and 'inValue2', the function copies the magnitude and sign of the second argument into the first one and directs the result to the output stream, OutMediatonStream. For example, copySign(5.6d, -3.0d) returns -5.6.

+

+### cos *(Function)* +

+

This function returns the cosine of p1 which is in radians. It wraps the java.lang.Math.cos() function.

+

+Syntax + +``` + math:cos( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose cosine value should be found.The input is required to be in radians.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:cos(inValue) as cosValue +insert into OutMediationStream; +``` +

+

If the 'inValue' is given, the function calculates the cosine value for the same and directs the output to the output stream, OutMediationStream. For example, cos(6d) returns 0.9601702866503661.

+

+### cosh *(Function)* +

+

This function returns the hyperbolic cosine of p1 which is in radians. It wraps the java.lang.Math.cosh() function.

+

+Syntax + +``` + math:cosh( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose hyperbolic cosine should be found. The input is required to be in radians.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:cosh(inValue) as cosValue +insert into OutMediationStream; +``` +

+

If the 'inValue' is given, the function calculates the hyperbolic cosine value for the same and directs the output to the output stream, OutMediationStream. For example, cosh (6d) returns 201.7156361224559.

+

+### e *(Function)* +

+

This function returns the java.lang.Math.E constant, which is the closest double value to e, where e is the base of the natural logarithms.

+

+Syntax + +``` + math:e() +``` + +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:e() as eValue +insert into OutMediationStream; +``` +

+

This function returns the constant, 2.7182818284590452354 which is the closest double value to e and directs the output to 'OutMediationStream' output stream.

+

+### exp *(Function)* +

+

This function returns the Euler's number e raised to the power of p1. It wraps the java.lang.Math.exp() function.

+

+Syntax + +``` + math:exp( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The power that the Euler's number e is raised to.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:exp(inValue) as expValue +insert into OutMediationStream; +``` +

+

If the 'inValue' in the inputstream holds a value, this function calculates the corresponding Euler's number 'e' and directs it to the output stream, OutMediationStream. For example, exp(10.23) returns 27722.51006805505.

+

+### floor *(Function)* +

+

This function wraps the java.lang.Math.floor() function and returns the largest value, i.e., closest to the positive infinity, that is less than or equal to p1, and is equal to a mathematical integer.

+

+Syntax + +``` + math:floor( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose floor value should be found.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:floor(inValue) as floorValue +insert into OutMediationStream; +``` +

+

This function calculates the floor value of the given 'inValue' input and directs the output to the 'OutMediationStream' output stream. For example, (10.23) returns 10.0.

+

+### 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 + +``` + math:getExponent( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of whose unbiased exponent representation should be found.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:getExponent(inValue) as expValue +insert into OutMediationStream; +``` +

+

This function calculates the unbiased exponent of a given input, 'inValue' and directs the result to the 'OutMediationStream' output stream. For example, getExponent(60984.1) returns 15.

+

+### hex *(Function)* +

+

This function wraps the java.lang.Double.toHexString() function. It returns a hexadecimal string representation of the input, p1`.

+

+Syntax + +``` + math:hex( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose hexadecimal value should be found.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue int); +from InValueStream +select math:hex(inValue) as hexString +insert into OutMediationStream; +``` +

+

If the 'inValue' in the input stream is provided, the function converts this into its corresponding hexadecimal format and directs the output to the output stream, OutMediationStream. For example, hex(200) returns "c8".

+

+### isInfinite *(Function)* +

+

This function wraps the java.lang.Float.isInfinite() and java.lang.Double.isInfinite() and returns true if p1 is infinitely large in magnitude and false if otherwise.

+

+Syntax + +``` + math:isInfinite( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

This is the value of the parameter that the function determines to be either infinite or finite.

FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue1 double,inValue2 int); +from InValueStream +select math:isInfinite(inValue1) as isInfinite +insert into OutMediationStream; +``` +

+

If the value given in the 'inValue' in the input stream is of infinitely large magnitude, the function returns the value, 'true' and directs the result to the output stream, OutMediationStream'. For example, isInfinite(java.lang.Double.POSITIVE_INFINITY) returns true.

+

+### 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 + +``` + math:isNan( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter which the function determines to be either NaN or a number.

FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue1 double,inValue2 int); +from InValueStream +select math:isNan(inValue1) as isNaN +insert into OutMediationStream; +``` +

+

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.

+

+### ln *(Function)* +

+

This function returns the natural logarithm (base e) of p1.

+

+Syntax + +``` + math:ln( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose natural logarithm (base e) should be found.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:ln(inValue) as lnValue +insert into OutMediationStream; +``` +

+

If the 'inValue' in the input stream is given, the function calculates its natural logarithm (base e) and directs the results to the output stream, 'OutMeditionStream'. For example, ln(11.453) returns 2.438251704415579.

+

+### log *(Function)* +

+

This function returns the logarithm of the received number as per the given base.

+

+Syntax + +``` + math:log( number, base) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
number

The value of the parameter whose base should be changed.

INT
LONG
FLOAT
DOUBLE
NoYes
base

The base value of the ouput.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (number double, base double); +from InValueStream +select math:log(number, base) as logValue +insert into OutMediationStream; +``` +

+

If the number and the base to which it has to be converted into is given in the input stream, the function calculates the number to the base specified and directs the result to the output stream, OutMediationStream. For example, log(34, 2f) returns 5.08746284125034.

+

+### log10 *(Function)* +

+

This function returns the base 10 logarithm of p1.

+

+Syntax + +``` + math:log10( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose base 10 logarithm should be found.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:log10(inValue) as lnValue +insert into OutMediationStream; +``` +

+

If the 'inValue' in the input stream is given, the function calculates the base 10 logarithm of the same and directs the result to the output stream, OutMediatioStream. For example, log10(19.234) returns 1.2840696117100832.

+

+### log2 *(Function)* +

+

This function returns the base 2 logarithm of p1.

+

+Syntax + +``` + math:log2( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose base 2 logarithm should be found.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:log2(inValue) as lnValue +insert into OutMediationStream; +``` +

+

If the 'inValue' in the input stream is given, the function calculates the base 2 logarithm of the same and returns the value to the output stream, OutMediationStream. For example log2(91d) returns 6.507794640198696.

+

+### max *(Function)* +

+

This function returns the greater value of p1 and p2.

+

+Syntax + +``` + math:max( p1, p2) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

One of the input values to be compared in order to find the larger value of the two

INT
LONG
FLOAT
DOUBLE
NoYes
p2

The input value to be compared with 'p1' in order to find the larger value of the two.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue1 double,inValue2 int); +from InValueStream +select math:max(inValue1,inValue2) as maxValue +insert into OutMediationStream; +``` +

+

If two input values 'inValue1, and 'inValue2' are given, the function compares them and directs the larger value to the output stream, OutMediationStream. For example, max(123.67d, 91) returns 123.67.

+

+### min *(Function)* +

+

This function returns the smaller value of p1 and p2.

+

+Syntax + +``` + math:min( p1, p2) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

One of the input values that are to be compared in order to find the smaller value.

INT
LONG
FLOAT
DOUBLE
NoYes
p2

The input value that is to be compared with 'p1' in order to find the smaller value.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue1 double,inValue2 int); +from InValueStream +select math:min(inValue1,inValue2) as minValue +insert into OutMediationStream; +``` +

+

If two input values, 'inValue1' and 'inValue2' are given, the function compares them and directs the smaller value of the two to the output stream, OutMediationStream. For example, min(123.67d, 91) returns 91.

+

+### oct *(Function)* +

+

This function converts the input parameter p1 to octal.

+

+Syntax + +``` + math:oct( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose octal representation should be found.

INT
LONG
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue long); +from InValueStream +select math:oct(inValue) as octValue +insert into OutMediationStream; +``` +

+

If the 'inValue' in the input stream is given, this function calculates the octal value corresponding to the same and directs it to the output stream, OutMediationStream. For example, oct(99l) returns "143".

+

+### parseDouble *(Function)* +

+

This function returns the double value of the string received.

+

+Syntax + +``` + math:parseDouble( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value that should be converted into a double value.

STRINGNoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue string); +from InValueStream +select math:parseDouble(inValue) as output +insert into OutMediationStream; +``` +

+

If the 'inValue' in the input stream holds a value, this function converts it into the corresponding double value and directs it to the output stream, OutMediationStream. For example, parseDouble("123") returns 123.0.

+

+### parseFloat *(Function)* +

+

This function returns the float value of the received string.

+

+Syntax + +``` + math:parseFloat( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value that should be converted into a float value.

STRINGNoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue string); +from InValueStream +select math:parseFloat(inValue) as output +insert into OutMediationStream; +``` +

+

The function converts the input value given in 'inValue',into its corresponding float value and directs the result into the output stream, OutMediationStream. For example, parseFloat("123") returns 123.0.

+

+### parseInt *(Function)* +

+

This function returns the integer value of the received string.

+

+Syntax + +``` + math:parseInt( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value that should be converted to an integer.

STRINGNoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue string); +from InValueStream +select math:parseInt(inValue) as output +insert into OutMediationStream; +``` +

+

The function converts the 'inValue' into its corresponding integer value and directs the output to the output stream, OutMediationStream. For example, parseInt("123") returns 123.

+

+### parseLong *(Function)* +

+

This function returns the long value of the string received.

+

+Syntax + +``` + math:parseLong( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value that should be converted to a long value.

STRINGNoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue string); +from InValueStream +select math:parseLong(inValue) as output +insert into OutMediationStream; +``` +

+

The function converts the 'inValue' to its corresponding long value and directs the result to the output stream, OutMediationStream. For example, parseLong("123") returns 123.

+

+### pi *(Function)* +

+

This 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 + +``` + 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)* +

+

This function raises the given value to a given power.

+

+Syntax + +``` + math:power( value, to.power) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
value

The value that should be raised to the power of 'to.power' input parameter.

INT
LONG
FLOAT
DOUBLE
NoYes
to.power

The power to which the 'value' input parameter should be raised.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue1 double, inValue2 double); +from InValueStream +select math:power(inValue1,inValue2) as powerValue +insert into OutMediationStream; +``` +

+

This function raises the 'inValue1' to the power of 'inValue2' and directs the output to the output stream, 'OutMediationStream. For example, (5.6d, 3.0d) returns 175.61599999999996.

+

+### rand *(Function)* +

+

This 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 internally use the java.util.Random class.

+

+Syntax + +``` + math:rand() + math:rand( seed) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
seed

An optional seed value that will be used to generate the random number sequence.

defaultSeedINT
LONG
YesYes
+ +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; +``` +

+

In the example given above, a random double value between 0 and 1 will be generated using math:rand().

+

+### round *(Function)* +

+

This function returns the value of the input argument rounded off to the closest integer/long value.

+

+Syntax + +``` + math:round( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value that should be rounded off to the closest integer/long value.

FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:round(inValue) as roundValue +insert into OutMediationStream; +``` +

+

The function rounds off 'inValue1' to the closest int/long value and directs the output to the output stream, 'OutMediationStream'. For example, round(3252.353) returns 3252.

+

+### signum *(Function)* +

+

This returns +1, 0, or -1 for the given positive, zero and negative values respectively. This function wraps the java.lang.Math.signum() function.

+

+Syntax + +``` + math:signum( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value that should be checked to be positive, negative or zero.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:signum(inValue) as sign +insert into OutMediationStream; +``` +

+

The function evaluates the 'inValue' given to be positive, negative or zero and directs the result to the output stream, 'OutMediationStream'. For example, signum(-6.32d) returns -1.

+

+### sin *(Function)* +

+

This returns the sine of the value given in radians. This function wraps the java.lang.Math.sin() function.

+

+Syntax + +``` + math:sin( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose sine value should be found. Input is required to be in radians.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:sin(inValue) as sinValue +insert into OutMediationStream; +``` +

+

The function calculates the sine value of the given 'inValue' and directs the output to the output stream, 'OutMediationStream. For example, sin(6d) returns -0.27941549819892586.

+

+### sinh *(Function)* +

+

This returns the hyperbolic sine of the value given in radians. This function wraps the java.lang.Math.sinh() function.

+

+Syntax + +``` + math:sinh( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose hyperbolic sine value should be found. Input is required to be in radians.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:sinh(inValue) as sinhValue +insert into OutMediationStream; +``` +

+

This function calculates the hyperbolic sine value of 'inValue' and directs the output to the output stream, 'OutMediationStream'. For example, sinh(6d) returns 201.71315737027922.

+

+### sqrt *(Function)* +

+

This function returns the square-root of the given value. It wraps the java.lang.Math.sqrt()s function.

+

+Syntax + +``` + math:sqrt( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose square-root value should be found.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:sqrt(inValue) as sqrtValue +insert into OutMediationStream; +``` +

+

The function calculates the square-root value of the 'inValue' and directs the output to the output stream, 'OutMediationStream'. For example, sqrt(4d) returns 2.

+

+### tan *(Function)* +

+

This function returns the tan of the given value in radians. It wraps the java.lang.Math.tan() function.

+

+Syntax + +``` + math:tan( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose tan value should be found. Input is required to be in radians.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:tan(inValue) as tanValue +insert into OutMediationStream; +``` +

+

This function calculates the tan value of the 'inValue' given and directs the output to the output stream, 'OutMediationStream'. For example, tan(6d) returns -0.29100619138474915.

+

+### tanh *(Function)* +

+

This function returns the hyperbolic tangent of the value given in radians. It wraps the java.lang.Math.tanh() function.

+

+Syntax + +``` + math:tanh( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The value of the parameter whose hyperbolic tangent value should be found. Input is required to be in radians.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:tanh(inValue) as tanhValue +insert into OutMediationStream; +``` +

+

If the 'inVaue' in the input stream is given, this function calculates the hyperbolic tangent value of the same and directs the output to 'OutMediationStream' stream. For example, tanh(6d) returns 0.9999877116507956.

+

+### toDegrees *(Function)* +

+

This function converts the value given in radians to degrees. It wraps the java.lang.Math.toDegrees() function.

+

+Syntax + +``` + math:toDegrees( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The input value in radians that should be converted to degrees.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:toDegrees(inValue) as degreesValue +insert into OutMediationStream; +``` +

+

The function converts the 'inValue' in the input stream from radians to degrees and directs the output to 'OutMediationStream' output stream. For example, toDegrees(6d) returns 343.77467707849394.

+

+### toRadians *(Function)* +

+

This function converts the value given in degrees to radians. It wraps the java.lang.Math.toRadians() function.

+

+Syntax + +``` + math:toRadians( p1) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1

The input value in degrees that should be converted to radians.

INT
LONG
FLOAT
DOUBLE
NoYes
+ +Examples +EXAMPLE 1 +``` +define stream InValueStream (inValue double); +from InValueStream +select math:toRadians(inValue) as radiansValue +insert into OutMediationStream; +``` +

+

This function converts the input, from degrees to radians and directs the result to 'OutMediationStream' output stream. For example, toRadians(6d) returns 0.10471975511965977.

+

diff --git a/docs/api/latest.md b/docs/api/latest.md index 3509ca7..570e49a 100644 --- a/docs/api/latest.md +++ b/docs/api/latest.md @@ -1,12 +1,14 @@ -# API Docs - v5.0.3 +# API Docs - v5.0.4 -!!! Info "Tested Siddhi Core version: *5.0.2*" +!!! Info "Tested Siddhi Core version: *5.1.5*" It could also support other Siddhi Core minor versions. ## Math -### percentile *(Aggregate Function)* -

This functions returns the pth percentile value of a given argument.

+### percentile *(Aggregate Function)* +

+

This functions returns the pth percentile value of a given argument.

+

Syntax ``` @@ -25,7 +27,7 @@ arg - The value of the parameter whose percentile should be found. +

The value of the parameter whose percentile should be found.

INT
LONG
FLOAT
DOUBLE No @@ -33,7 +35,7 @@ p - Estimate of the percentile to be found (pth percentile) where p is any number greater than 0 or lesser than or equal to 100. +

Estimate of the percentile to be found (pth percentile) where p is any number greater than 0 or lesser than or equal to 100.

DOUBLE No @@ -49,10 +51,13 @@ from InValueStream select math:percentile(temperature, 97.0) as percentile insert into OutMediationStream; ``` -

This function returns the percentile value based on the argument given. For example, math:percentile(temperature, 97.0) returns the 97th percentile value of all the temperature events.

- -### abs *(Function)* -

This function returns the absolute value of the given parameter. It wraps the java.lang.Math.abs() function.

+

+

This function returns the percentile value based on the argument given. For example, math:percentile(temperature, 97.0) returns the 97th percentile value of all the temperature events.

+

+### abs *(Function)* +

+

This function returns the absolute value of the given parameter. It wraps the java.lang.Math.abs() function.

+

Syntax ``` @@ -71,7 +76,7 @@ insert into OutMediationStream; p1 - The parameter whose absolute value is found. +

The parameter whose absolute value is found.

INT
LONG
FLOAT
DOUBLE No @@ -87,10 +92,13 @@ from InValueStream select math:abs(inValue) as absValue insert into OutMediationStream; ``` -

Irrespective of whether the 'invalue' in the input stream holds a value of abs(3) or abs(-3),the function returns 3 since the absolute value of both 3 and -3 is 3. The result directed to OutMediationStream stream.

- -### acos *(Function)* -

If -1 <= p1 <= 1, this function returns the arc-cosine (inverse cosine) value of p1.If the domain is invalid, it returns NULL. The value returned is in radian scale. This function wraps the java.lang.Math.acos() function.

+

+

Irrespective of whether the 'invalue' in the input stream holds a value of abs(3) or abs(-3),the function returns 3 since the absolute value of both 3 and -3 is 3. The result directed to OutMediationStream stream.

+

+### acos *(Function)* +

+

If -1 <= p1 <= 1, this function returns the arc-cosine (inverse cosine) value of p1.If the domain is invalid, it returns NULL. The value returned is in radian scale. This function wraps the java.lang.Math.acos() function.

+

Syntax ``` @@ -109,7 +117,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose arc-cosine (inverse cosine) value is found. +

The value of the parameter whose arc-cosine (inverse cosine) value is found.

FLOAT
DOUBLE No @@ -125,10 +133,13 @@ from InValueStream select math:acos(inValue) as acosValue insert into OutMediationStream; ``` -

If the 'inValue' in the input stream is given, the function calculates the arc-cosine value of it and returns the arc-cosine value to the output stream, OutMediationStream. For example, acos(0.5) returns 1.0471975511965979.

- -### asin *(Function)* -

If -1 <= p1 <= 1, this function returns the arc-sin (inverse sine) value of p1. If the domain is invalid, it returns NULL. The value returned is in radian scale. This function wraps the java.lang.Math.asin() function.

+

+

If the 'inValue' in the input stream is given, the function calculates the arc-cosine value of it and returns the arc-cosine value to the output stream, OutMediationStream. For example, acos(0.5) returns 1.0471975511965979.

+

+### asin *(Function)* +

+

If -1 <= p1 <= 1, this function returns the arc-sin (inverse sine) value of p1. If the domain is invalid, it returns NULL. The value returned is in radian scale. This function wraps the java.lang.Math.asin() function.

+

Syntax ``` @@ -147,7 +158,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose arc-sin (inverse sine) value is found. +

The value of the parameter whose arc-sin (inverse sine) value is found.

FLOAT
DOUBLE No @@ -163,10 +174,13 @@ from InValueStream select math:asin(inValue) as asinValue insert into OutMediationStream; ``` -

If the 'inValue' in the input stream is given, the function calculates the arc-sin value of it and returns the arc-sin value to the output stream, OutMediationStream. For example, asin(0.5) returns 0.5235987755982989.

- -### atan *(Function)* -

1. If a single p1 is received, this function returns the arc-tangent (inverse tangent) value of p1.
2. If p1 is received along with an optional p1, it considers them as x and y coordinates and returns the arc-tangent (inverse tangent) value.
The returned value is in radian scale. This function wraps the java.lang.Math.atan() function.

+

+

If the 'inValue' in the input stream is given, the function calculates the arc-sin value of it and returns the arc-sin value to the output stream, OutMediationStream. For example, asin(0.5) returns 0.5235987755982989.

+

+### atan *(Function)* +

+

1. If a single p1 is received, this function returns the arc-tangent (inverse tangent) value of p1.
2. If p1 is received along with an optional p1, it considers them as x and y coordinates and returns the arc-tangent (inverse tangent) value.
The returned value is in radian scale. This function wraps the java.lang.Math.atan() function.

+

Syntax ``` @@ -186,7 +200,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose arc-tangent (inverse tangent) is found. If the optional second parameter is given this represents the x coordinate of the (x,y) coordinate pair. +

The value of the parameter whose arc-tangent (inverse tangent) is found. If the optional second parameter is given this represents the x coordinate of the (x,y) coordinate pair.

INT
LONG
FLOAT
DOUBLE No @@ -194,7 +208,7 @@ insert into OutMediationStream; p2 - This optional parameter represents the y coordinate of the (x,y) coordinate pair. +

This optional parameter represents the y coordinate of the (x,y) coordinate pair.

0D INT
LONG
FLOAT
DOUBLE Yes @@ -210,10 +224,13 @@ from InValueStream select math:atan(inValue1, inValue2) as convertedValue insert into OutMediationStream; ``` -

If the 'inValue1' in the input stream is given, the function calculates the arc-tangent value of it and returns the arc-tangent value to the output stream, OutMediationStream. If both the 'inValue1' and 'inValue2' are given, then the function considers them to be x and y coordinates respectively and returns the calculated arc-tangent value to the output stream, OutMediationStream. For example, atan(12d, 5d) returns 1.1760052070951352.

- -### bin *(Function)* -

This function returns a string representation of the p1 argument, that is of either 'integer' or 'long' data type, as an unsigned integer in base 2. It wraps the java.lang.Integer.toBinaryString and java.lang.Long.toBinaryString` methods.

+

+

If the 'inValue1' in the input stream is given, the function calculates the arc-tangent value of it and returns the arc-tangent value to the output stream, OutMediationStream. If both the 'inValue1' and 'inValue2' are given, then the function considers them to be x and y coordinates respectively and returns the calculated arc-tangent value to the output stream, OutMediationStream. For example, atan(12d, 5d) returns 1.1760052070951352.

+

+### bin *(Function)* +

+

This function returns a string representation of the p1 argument, that is of either 'integer' or 'long' data type, as an unsigned integer in base 2. It wraps the java.lang.Integer.toBinaryString and java.lang.Long.toBinaryString` methods.

+

Syntax ``` @@ -232,7 +249,7 @@ insert into OutMediationStream; p1 - The value in either 'integer' or 'long', that should be converted into an unsigned integer of base 2. +

The value in either 'integer' or 'long', that should be converted into an unsigned integer of base 2.

INT
LONG No @@ -248,10 +265,13 @@ from InValueStream select math:bin(inValue) as binValue insert into OutMediationStream; ``` -

If the 'inValue' in the input stream is given, the function converts it into an unsigned integer in base 2 and directs the output to the output stream, OutMediationStream. For example, bin(9) returns '1001'.

- -### cbrt *(Function)* -

This function returns the cube-root of 'p1' which is in radians. It wraps the java.lang.Math.cbrt() function.

+

+

If the 'inValue' in the input stream is given, the function converts it into an unsigned integer in base 2 and directs the output to the output stream, OutMediationStream. For example, bin(9) returns '1001'.

+

+### cbrt *(Function)* +

+

This function returns the cube-root of 'p1' which is in radians. It wraps the java.lang.Math.cbrt() function.

+

Syntax ``` @@ -270,7 +290,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose cube-root should be found. Input is required to be in radians. +

The value of the parameter whose cube-root should be found. Input is required to be in radians.

INT
LONG
FLOAT
DOUBLE No @@ -286,10 +306,13 @@ from InValueStream select math:cbrt(inValue) as cbrtValue insert into OutMediationStream; ``` -

If the 'inValue' is given, the function calculates the cube-root value for the same and directs the output to the output stream, OutMediationStream. For example, cbrt(17d) returns 2.5712815906582356.

- -### ceil *(Function)* -

This function returns the smallest double value, i.e., the closest to the negative infinity, that is greater than or equal to the p1 argument, and is equal to a mathematical integer. It wraps the java.lang.Math.ceil() method.

+

+

If the 'inValue' is given, the function calculates the cube-root value for the same and directs the output to the output stream, OutMediationStream. For example, cbrt(17d) returns 2.5712815906582356.

+

+### ceil *(Function)* +

+

This function returns the smallest double value, i.e., the closest to the negative infinity, that is greater than or equal to the p1 argument, and is equal to a mathematical integer. It wraps the java.lang.Math.ceil() method.

+

Syntax ``` @@ -308,7 +331,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose ceiling value is found. +

The value of the parameter whose ceiling value is found.

FLOAT
DOUBLE No @@ -324,10 +347,13 @@ from InValueStream select math:ceil(inValue) as ceilingValue insert into OutMediationStream; ``` -

This function calculates the ceiling value of the given 'inValue' and directs the result to 'OutMediationStream' output stream. For example, ceil(423.187d) returns 424.0.

- -### conv *(Function)* -

This function converts a from the fromBase base to the toBase base.

+

+

This function calculates the ceiling value of the given 'inValue' and directs the result to 'OutMediationStream' output stream. For example, ceil(423.187d) returns 424.0.

+

+### conv *(Function)* +

+

This function converts a from the fromBase base to the toBase base.

+

Syntax ``` @@ -346,7 +372,7 @@ insert into OutMediationStream; a - The value whose base should be changed. Input should be given as a 'String'. +

The value whose base should be changed. Input should be given as a 'String'.

STRING No @@ -354,7 +380,7 @@ insert into OutMediationStream; from.base - The source base of the input parameter 'a'. +

The source base of the input parameter 'a'.

INT No @@ -362,7 +388,7 @@ insert into OutMediationStream; to.base - The target base that the input parameter 'a' should be converted into. +

The target base that the input parameter 'a' should be converted into.

INT No @@ -378,10 +404,13 @@ from InValueStream select math:conv(inValue,fromBase,toBase) as convertedValue insert into OutMediationStream; ``` -

If the 'inValue' in the input stream is given, and the base in which it currently resides in and the base to which it should be converted to is specified, the function converts it into a string in the target base and directs it to the output stream, OutMediationStream. For example, conv("7f", 16, 10) returns "127".

- -### copySign *(Function)* -

This function returns a value of an input with the received magnitude and sign of another input. It wraps the java.lang.Math.copySign() function.

+

+

If the 'inValue' in the input stream is given, and the base in which it currently resides in and the base to which it should be converted to is specified, the function converts it into a string in the target base and directs it to the output stream, OutMediationStream. For example, conv("7f", 16, 10) returns "127".

+

+### copySign *(Function)* +

+

This function returns a value of an input with the received magnitude and sign of another input. It wraps the java.lang.Math.copySign() function.

+

Syntax ``` @@ -400,7 +429,7 @@ insert into OutMediationStream; magnitude - The magnitude of this parameter is used in the output attribute. +

The magnitude of this parameter is used in the output attribute.

INT
LONG
FLOAT
DOUBLE No @@ -408,7 +437,7 @@ insert into OutMediationStream; sign - The sign of this parameter is used in the output attribute. +

The sign of this parameter is used in the output attribute.

INT
LONG
FLOAT
DOUBLE No @@ -424,10 +453,13 @@ from InValueStream select math:copySign(inValue1,inValue2) as copysignValue insert into OutMediationStream; ``` -

If two values are provided as 'inValue1' and 'inValue2', the function copies the magnitude and sign of the second argument into the first one and directs the result to the output stream, OutMediatonStream. For example, copySign(5.6d, -3.0d) returns -5.6.

- -### cos *(Function)* -

This function returns the cosine of p1 which is in radians. It wraps the java.lang.Math.cos() function.

+

+

If two values are provided as 'inValue1' and 'inValue2', the function copies the magnitude and sign of the second argument into the first one and directs the result to the output stream, OutMediatonStream. For example, copySign(5.6d, -3.0d) returns -5.6.

+

+### cos *(Function)* +

+

This function returns the cosine of p1 which is in radians. It wraps the java.lang.Math.cos() function.

+

Syntax ``` @@ -446,7 +478,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose cosine value should be found.The input is required to be in radians. +

The value of the parameter whose cosine value should be found.The input is required to be in radians.

INT
LONG
FLOAT
DOUBLE No @@ -462,10 +494,13 @@ from InValueStream select math:cos(inValue) as cosValue insert into OutMediationStream; ``` -

If the 'inValue' is given, the function calculates the cosine value for the same and directs the output to the output stream, OutMediationStream. For example, cos(6d) returns 0.9601702866503661.

- -### cosh *(Function)* -

This function returns the hyperbolic cosine of p1 which is in radians. It wraps the java.lang.Math.cosh() function.

+

+

If the 'inValue' is given, the function calculates the cosine value for the same and directs the output to the output stream, OutMediationStream. For example, cos(6d) returns 0.9601702866503661.

+

+### cosh *(Function)* +

+

This function returns the hyperbolic cosine of p1 which is in radians. It wraps the java.lang.Math.cosh() function.

+

Syntax ``` @@ -484,7 +519,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose hyperbolic cosine should be found. The input is required to be in radians. +

The value of the parameter whose hyperbolic cosine should be found. The input is required to be in radians.

INT
LONG
FLOAT
DOUBLE No @@ -500,10 +535,13 @@ from InValueStream select math:cosh(inValue) as cosValue insert into OutMediationStream; ``` -

If the 'inValue' is given, the function calculates the hyperbolic cosine value for the same and directs the output to the output stream, OutMediationStream. For example, cosh (6d) returns 201.7156361224559.

- -### e *(Function)* -

This function returns the java.lang.Math.E constant, which is the closest double value to e, where e is the base of the natural logarithms.

+

+

If the 'inValue' is given, the function calculates the hyperbolic cosine value for the same and directs the output to the output stream, OutMediationStream. For example, cosh (6d) returns 201.7156361224559.

+

+### e *(Function)* +

+

This function returns the java.lang.Math.E constant, which is the closest double value to e, where e is the base of the natural logarithms.

+

Syntax ``` @@ -518,10 +556,13 @@ from InValueStream select math:e() as eValue insert into OutMediationStream; ``` -

This function returns the constant, 2.7182818284590452354 which is the closest double value to e and directs the output to 'OutMediationStream' output stream.

- -### exp *(Function)* -

This function returns the Euler's number e raised to the power of p1. It wraps the java.lang.Math.exp() function.

+

+

This function returns the constant, 2.7182818284590452354 which is the closest double value to e and directs the output to 'OutMediationStream' output stream.

+

+### exp *(Function)* +

+

This function returns the Euler's number e raised to the power of p1. It wraps the java.lang.Math.exp() function.

+

Syntax ``` @@ -540,7 +581,7 @@ insert into OutMediationStream; p1 - The power that the Euler's number e is raised to. +

The power that the Euler's number e is raised to.

INT
LONG
FLOAT
DOUBLE No @@ -556,10 +597,13 @@ from InValueStream select math:exp(inValue) as expValue insert into OutMediationStream; ``` -

If the 'inValue' in the inputstream holds a value, this function calculates the corresponding Euler's number 'e' and directs it to the output stream, OutMediationStream. For example, exp(10.23) returns 27722.51006805505.

- -### floor *(Function)* -

This function wraps the java.lang.Math.floor() function and returns the largest value, i.e., closest to the positive infinity, that is less than or equal to p1, and is equal to a mathematical integer.

+

+

If the 'inValue' in the inputstream holds a value, this function calculates the corresponding Euler's number 'e' and directs it to the output stream, OutMediationStream. For example, exp(10.23) returns 27722.51006805505.

+

+### floor *(Function)* +

+

This function wraps the java.lang.Math.floor() function and returns the largest value, i.e., closest to the positive infinity, that is less than or equal to p1, and is equal to a mathematical integer.

+

Syntax ``` @@ -578,7 +622,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose floor value should be found. +

The value of the parameter whose floor value should be found.

INT
LONG
FLOAT
DOUBLE No @@ -594,10 +638,13 @@ from InValueStream select math:floor(inValue) as floorValue insert into OutMediationStream; ``` -

This function calculates the floor value of the given 'inValue' input and directs the output to the 'OutMediationStream' output stream. For example, (10.23) returns 10.0.

- -### 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.

+

+

This function calculates the floor value of the given 'inValue' input and directs the output to the 'OutMediationStream' output stream. For example, (10.23) returns 10.0.

+

+### 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 ``` @@ -616,7 +663,7 @@ insert into OutMediationStream; p1 - The value of whose unbiased exponent representation should be found. +

The value of whose unbiased exponent representation should be found.

INT
LONG
FLOAT
DOUBLE No @@ -632,10 +679,13 @@ from InValueStream select math:getExponent(inValue) as expValue insert into OutMediationStream; ``` -

This function calculates the unbiased exponent of a given input, 'inValue' and directs the result to the 'OutMediationStream' output stream. For example, getExponent(60984.1) returns 15.

- -### hex *(Function)* -

This function wraps the java.lang.Double.toHexString() function. It returns a hexadecimal string representation of the input, p1`.

+

+

This function calculates the unbiased exponent of a given input, 'inValue' and directs the result to the 'OutMediationStream' output stream. For example, getExponent(60984.1) returns 15.

+

+### hex *(Function)* +

+

This function wraps the java.lang.Double.toHexString() function. It returns a hexadecimal string representation of the input, p1`.

+

Syntax ``` @@ -654,7 +704,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose hexadecimal value should be found. +

The value of the parameter whose hexadecimal value should be found.

INT
LONG
FLOAT
DOUBLE No @@ -670,10 +720,13 @@ from InValueStream select math:hex(inValue) as hexString insert into OutMediationStream; ``` -

If the 'inValue' in the input stream is provided, the function converts this into its corresponding hexadecimal format and directs the output to the output stream, OutMediationStream. For example, hex(200) returns "c8".

- -### isInfinite *(Function)* -

This function wraps the java.lang.Float.isInfinite() and java.lang.Double.isInfinite() and returns true if p1 is infinitely large in magnitude and false if otherwise.

+

+

If the 'inValue' in the input stream is provided, the function converts this into its corresponding hexadecimal format and directs the output to the output stream, OutMediationStream. For example, hex(200) returns "c8".

+

+### isInfinite *(Function)* +

+

This function wraps the java.lang.Float.isInfinite() and java.lang.Double.isInfinite() and returns true if p1 is infinitely large in magnitude and false if otherwise.

+

Syntax ``` @@ -692,7 +745,7 @@ insert into OutMediationStream; p1 - This is the value of the parameter that the function determines to be either infinite or finite. +

This is the value of the parameter that the function determines to be either infinite or finite.

FLOAT
DOUBLE No @@ -708,10 +761,13 @@ from InValueStream select math:isInfinite(inValue1) as isInfinite insert into OutMediationStream; ``` -

If the value given in the 'inValue' in the input stream is of infinitely large magnitude, the function returns the value, 'true' and directs the result to the output stream, OutMediationStream'. For example, isInfinite(java.lang.Double.POSITIVE_INFINITY) returns true.

- -### 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.

+

+

If the value given in the 'inValue' in the input stream is of infinitely large magnitude, the function returns the value, 'true' and directs the result to the output stream, OutMediationStream'. For example, isInfinite(java.lang.Double.POSITIVE_INFINITY) returns true.

+

+### 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 ``` @@ -730,7 +786,7 @@ insert into OutMediationStream; p1 - The value of the parameter which the function determines to be either NaN or a number. +

The value of the parameter which the function determines to be either NaN or a number.

FLOAT
DOUBLE No @@ -746,10 +802,13 @@ from InValueStream select math:isNan(inValue1) as isNaN insert into OutMediationStream; ``` -

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.

- -### ln *(Function)* -

This function returns the natural logarithm (base e) of p1.

+

+

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.

+

+### ln *(Function)* +

+

This function returns the natural logarithm (base e) of p1.

+

Syntax ``` @@ -768,7 +827,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose natural logarithm (base e) should be found. +

The value of the parameter whose natural logarithm (base e) should be found.

INT
LONG
FLOAT
DOUBLE No @@ -784,10 +843,13 @@ from InValueStream select math:ln(inValue) as lnValue insert into OutMediationStream; ``` -

If the 'inValue' in the input stream is given, the function calculates its natural logarithm (base e) and directs the results to the output stream, 'OutMeditionStream'. For example, ln(11.453) returns 2.438251704415579.

- -### log *(Function)* -

This function returns the logarithm of the received number as per the given base.

+

+

If the 'inValue' in the input stream is given, the function calculates its natural logarithm (base e) and directs the results to the output stream, 'OutMeditionStream'. For example, ln(11.453) returns 2.438251704415579.

+

+### log *(Function)* +

+

This function returns the logarithm of the received number as per the given base.

+

Syntax ``` @@ -806,7 +868,7 @@ insert into OutMediationStream; number - The value of the parameter whose base should be changed. +

The value of the parameter whose base should be changed.

INT
LONG
FLOAT
DOUBLE No @@ -814,7 +876,7 @@ insert into OutMediationStream; base - The base value of the ouput. +

The base value of the ouput.

INT
LONG
FLOAT
DOUBLE No @@ -830,10 +892,13 @@ from InValueStream select math:log(number, base) as logValue insert into OutMediationStream; ``` -

If the number and the base to which it has to be converted into is given in the input stream, the function calculates the number to the base specified and directs the result to the output stream, OutMediationStream. For example, log(34, 2f) returns 5.08746284125034.

- -### log10 *(Function)* -

This function returns the base 10 logarithm of p1.

+

+

If the number and the base to which it has to be converted into is given in the input stream, the function calculates the number to the base specified and directs the result to the output stream, OutMediationStream. For example, log(34, 2f) returns 5.08746284125034.

+

+### log10 *(Function)* +

+

This function returns the base 10 logarithm of p1.

+

Syntax ``` @@ -852,7 +917,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose base 10 logarithm should be found. +

The value of the parameter whose base 10 logarithm should be found.

INT
LONG
FLOAT
DOUBLE No @@ -868,10 +933,13 @@ from InValueStream select math:log10(inValue) as lnValue insert into OutMediationStream; ``` -

If the 'inValue' in the input stream is given, the function calculates the base 10 logarithm of the same and directs the result to the output stream, OutMediatioStream. For example, log10(19.234) returns 1.2840696117100832.

- -### log2 *(Function)* -

This function returns the base 2 logarithm of p1.

+

+

If the 'inValue' in the input stream is given, the function calculates the base 10 logarithm of the same and directs the result to the output stream, OutMediatioStream. For example, log10(19.234) returns 1.2840696117100832.

+

+### log2 *(Function)* +

+

This function returns the base 2 logarithm of p1.

+

Syntax ``` @@ -890,7 +958,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose base 2 logarithm should be found. +

The value of the parameter whose base 2 logarithm should be found.

INT
LONG
FLOAT
DOUBLE No @@ -906,10 +974,13 @@ from InValueStream select math:log2(inValue) as lnValue insert into OutMediationStream; ``` -

If the 'inValue' in the input stream is given, the function calculates the base 2 logarithm of the same and returns the value to the output stream, OutMediationStream. For example log2(91d) returns 6.507794640198696.

- -### max *(Function)* -

This function returns the greater value of p1 and p2.

+

+

If the 'inValue' in the input stream is given, the function calculates the base 2 logarithm of the same and returns the value to the output stream, OutMediationStream. For example log2(91d) returns 6.507794640198696.

+

+### max *(Function)* +

+

This function returns the greater value of p1 and p2.

+

Syntax ``` @@ -928,7 +999,7 @@ insert into OutMediationStream; p1 - One of the input values to be compared in order to find the larger value of the two +

One of the input values to be compared in order to find the larger value of the two

INT
LONG
FLOAT
DOUBLE No @@ -936,7 +1007,7 @@ insert into OutMediationStream; p2 - The input value to be compared with 'p1' in order to find the larger value of the two. +

The input value to be compared with 'p1' in order to find the larger value of the two.

INT
LONG
FLOAT
DOUBLE No @@ -952,10 +1023,13 @@ from InValueStream select math:max(inValue1,inValue2) as maxValue insert into OutMediationStream; ``` -

If two input values 'inValue1, and 'inValue2' are given, the function compares them and directs the larger value to the output stream, OutMediationStream. For example, max(123.67d, 91) returns 123.67.

- -### min *(Function)* -

This function returns the smaller value of p1 and p2.

+

+

If two input values 'inValue1, and 'inValue2' are given, the function compares them and directs the larger value to the output stream, OutMediationStream. For example, max(123.67d, 91) returns 123.67.

+

+### min *(Function)* +

+

This function returns the smaller value of p1 and p2.

+

Syntax ``` @@ -974,7 +1048,7 @@ insert into OutMediationStream; p1 - One of the input values that are to be compared in order to find the smaller value. +

One of the input values that are to be compared in order to find the smaller value.

INT
LONG
FLOAT
DOUBLE No @@ -982,7 +1056,7 @@ insert into OutMediationStream; p2 - The input value that is to be compared with 'p1' in order to find the smaller value. +

The input value that is to be compared with 'p1' in order to find the smaller value.

INT
LONG
FLOAT
DOUBLE No @@ -998,10 +1072,13 @@ from InValueStream select math:min(inValue1,inValue2) as minValue insert into OutMediationStream; ``` -

If two input values, 'inValue1' and 'inValue2' are given, the function compares them and directs the smaller value of the two to the output stream, OutMediationStream. For example, min(123.67d, 91) returns 91.

- -### oct *(Function)* -

This function converts the input parameter p1 to octal.

+

+

If two input values, 'inValue1' and 'inValue2' are given, the function compares them and directs the smaller value of the two to the output stream, OutMediationStream. For example, min(123.67d, 91) returns 91.

+

+### oct *(Function)* +

+

This function converts the input parameter p1 to octal.

+

Syntax ``` @@ -1020,7 +1097,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose octal representation should be found. +

The value of the parameter whose octal representation should be found.

INT
LONG No @@ -1036,10 +1113,13 @@ from InValueStream select math:oct(inValue) as octValue insert into OutMediationStream; ``` -

If the 'inValue' in the input stream is given, this function calculates the octal value corresponding to the same and directs it to the output stream, OutMediationStream. For example, oct(99l) returns "143".

- -### parseDouble *(Function)* -

This function returns the double value of the string received.

+

+

If the 'inValue' in the input stream is given, this function calculates the octal value corresponding to the same and directs it to the output stream, OutMediationStream. For example, oct(99l) returns "143".

+

+### parseDouble *(Function)* +

+

This function returns the double value of the string received.

+

Syntax ``` @@ -1058,7 +1138,7 @@ insert into OutMediationStream; p1 - The value that should be converted into a double value. +

The value that should be converted into a double value.

STRING No @@ -1074,10 +1154,13 @@ from InValueStream select math:parseDouble(inValue) as output insert into OutMediationStream; ``` -

If the 'inValue' in the input stream holds a value, this function converts it into the corresponding double value and directs it to the output stream, OutMediationStream. For example, parseDouble("123") returns 123.0.

- -### parseFloat *(Function)* -

This function returns the float value of the received string.

+

+

If the 'inValue' in the input stream holds a value, this function converts it into the corresponding double value and directs it to the output stream, OutMediationStream. For example, parseDouble("123") returns 123.0.

+

+### parseFloat *(Function)* +

+

This function returns the float value of the received string.

+

Syntax ``` @@ -1096,7 +1179,7 @@ insert into OutMediationStream; p1 - The value that should be converted into a float value. +

The value that should be converted into a float value.

STRING No @@ -1112,10 +1195,13 @@ from InValueStream select math:parseFloat(inValue) as output insert into OutMediationStream; ``` -

The function converts the input value given in 'inValue',into its corresponding float value and directs the result into the output stream, OutMediationStream. For example, parseFloat("123") returns 123.0.

- -### parseInt *(Function)* -

This function returns the integer value of the received string.

+

+

The function converts the input value given in 'inValue',into its corresponding float value and directs the result into the output stream, OutMediationStream. For example, parseFloat("123") returns 123.0.

+

+### parseInt *(Function)* +

+

This function returns the integer value of the received string.

+

Syntax ``` @@ -1134,7 +1220,7 @@ insert into OutMediationStream; p1 - The value that should be converted to an integer. +

The value that should be converted to an integer.

STRING No @@ -1150,10 +1236,13 @@ from InValueStream select math:parseInt(inValue) as output insert into OutMediationStream; ``` -

The function converts the 'inValue' into its corresponding integer value and directs the output to the output stream, OutMediationStream. For example, parseInt("123") returns 123.

- -### parseLong *(Function)* -

This function returns the long value of the string received.

+

+

The function converts the 'inValue' into its corresponding integer value and directs the output to the output stream, OutMediationStream. For example, parseInt("123") returns 123.

+

+### parseLong *(Function)* +

+

This function returns the long value of the string received.

+

Syntax ``` @@ -1172,7 +1261,7 @@ insert into OutMediationStream; p1 - The value that should be converted to a long value. +

The value that should be converted to a long value.

STRING No @@ -1188,10 +1277,13 @@ from InValueStream select math:parseLong(inValue) as output insert into OutMediationStream; ``` -

The function converts the 'inValue' to its corresponding long value and directs the result to the output stream, OutMediationStream. For example, parseLong("123") returns 123.

- -### pi *(Function)* -

This 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.

+

+

The function converts the 'inValue' to its corresponding long value and directs the result to the output stream, OutMediationStream. For example, parseLong("123") returns 123.

+

+### pi *(Function)* +

+

This 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 ``` @@ -1206,10 +1298,13 @@ from InValueStream select math:pi() as piValue insert into OutMediationStream; ``` -

pi() always returns 3.141592653589793.

- -### power *(Function)* -

This function raises the given value to a given power.

+

+

pi() always returns 3.141592653589793.

+

+### power *(Function)* +

+

This function raises the given value to a given power.

+

Syntax ``` @@ -1228,7 +1323,7 @@ insert into OutMediationStream; value - The value that should be raised to the power of 'to.power' input parameter. +

The value that should be raised to the power of 'to.power' input parameter.

INT
LONG
FLOAT
DOUBLE No @@ -1236,7 +1331,7 @@ insert into OutMediationStream; to.power - The power to which the 'value' input parameter should be raised. +

The power to which the 'value' input parameter should be raised.

INT
LONG
FLOAT
DOUBLE No @@ -1252,10 +1347,13 @@ from InValueStream select math:power(inValue1,inValue2) as powerValue insert into OutMediationStream; ``` -

This function raises the 'inValue1' to the power of 'inValue2' and directs the output to the output stream, 'OutMediationStream. For example, (5.6d, 3.0d) returns 175.61599999999996.

- -### rand *(Function)* -

This 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 internally use the java.util.Random class.

+

+

This function raises the 'inValue1' to the power of 'inValue2' and directs the output to the output stream, 'OutMediationStream. For example, (5.6d, 3.0d) returns 175.61599999999996.

+

+### rand *(Function)* +

+

This 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 internally use the java.util.Random class.

+

Syntax ``` @@ -1275,7 +1373,7 @@ insert into OutMediationStream; seed - An optional seed value that will be used to generate the random number sequence. +

An optional seed value that will be used to generate the random number sequence.

defaultSeed INT
LONG Yes @@ -1291,10 +1389,13 @@ from InValueStream select symbol, math:rand() as randNumber select math:oct(inValue) as octValue insert into OutMediationStream; ``` -

In the example given above, a random double value between 0 and 1 will be generated using math:rand().

- -### round *(Function)* -

This function returns the value of the input argument rounded off to the closest integer/long value.

+

+

In the example given above, a random double value between 0 and 1 will be generated using math:rand().

+

+### round *(Function)* +

+

This function returns the value of the input argument rounded off to the closest integer/long value.

+

Syntax ``` @@ -1313,7 +1414,7 @@ insert into OutMediationStream; p1 - The value that should be rounded off to the closest integer/long value. +

The value that should be rounded off to the closest integer/long value.

FLOAT
DOUBLE No @@ -1329,10 +1430,13 @@ from InValueStream select math:round(inValue) as roundValue insert into OutMediationStream; ``` -

The function rounds off 'inValue1' to the closest int/long value and directs the output to the output stream, 'OutMediationStream'. For example, round(3252.353) returns 3252.

- -### signum *(Function)* -

This returns +1, 0, or -1 for the given positive, zero and negative values respectively. This function wraps the java.lang.Math.signum() function.

+

+

The function rounds off 'inValue1' to the closest int/long value and directs the output to the output stream, 'OutMediationStream'. For example, round(3252.353) returns 3252.

+

+### signum *(Function)* +

+

This returns +1, 0, or -1 for the given positive, zero and negative values respectively. This function wraps the java.lang.Math.signum() function.

+

Syntax ``` @@ -1351,7 +1455,7 @@ insert into OutMediationStream; p1 - The value that should be checked to be positive, negative or zero. +

The value that should be checked to be positive, negative or zero.

INT
LONG
FLOAT
DOUBLE No @@ -1367,10 +1471,13 @@ from InValueStream select math:signum(inValue) as sign insert into OutMediationStream; ``` -

The function evaluates the 'inValue' given to be positive, negative or zero and directs the result to the output stream, 'OutMediationStream'. For example, signum(-6.32d) returns -1.

- -### sin *(Function)* -

This returns the sine of the value given in radians. This function wraps the java.lang.Math.sin() function.

+

+

The function evaluates the 'inValue' given to be positive, negative or zero and directs the result to the output stream, 'OutMediationStream'. For example, signum(-6.32d) returns -1.

+

+### sin *(Function)* +

+

This returns the sine of the value given in radians. This function wraps the java.lang.Math.sin() function.

+

Syntax ``` @@ -1389,7 +1496,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose sine value should be found. Input is required to be in radians. +

The value of the parameter whose sine value should be found. Input is required to be in radians.

INT
LONG
FLOAT
DOUBLE No @@ -1405,10 +1512,13 @@ from InValueStream select math:sin(inValue) as sinValue insert into OutMediationStream; ``` -

The function calculates the sine value of the given 'inValue' and directs the output to the output stream, 'OutMediationStream. For example, sin(6d) returns -0.27941549819892586.

- -### sinh *(Function)* -

This returns the hyperbolic sine of the value given in radians. This function wraps the java.lang.Math.sinh() function.

+

+

The function calculates the sine value of the given 'inValue' and directs the output to the output stream, 'OutMediationStream. For example, sin(6d) returns -0.27941549819892586.

+

+### sinh *(Function)* +

+

This returns the hyperbolic sine of the value given in radians. This function wraps the java.lang.Math.sinh() function.

+

Syntax ``` @@ -1427,7 +1537,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose hyperbolic sine value should be found. Input is required to be in radians. +

The value of the parameter whose hyperbolic sine value should be found. Input is required to be in radians.

INT
LONG
FLOAT
DOUBLE No @@ -1443,10 +1553,13 @@ from InValueStream select math:sinh(inValue) as sinhValue insert into OutMediationStream; ``` -

This function calculates the hyperbolic sine value of 'inValue' and directs the output to the output stream, 'OutMediationStream'. For example, sinh(6d) returns 201.71315737027922.

- -### sqrt *(Function)* -

This function returns the square-root of the given value. It wraps the java.lang.Math.sqrt()s function.

+

+

This function calculates the hyperbolic sine value of 'inValue' and directs the output to the output stream, 'OutMediationStream'. For example, sinh(6d) returns 201.71315737027922.

+

+### sqrt *(Function)* +

+

This function returns the square-root of the given value. It wraps the java.lang.Math.sqrt()s function.

+

Syntax ``` @@ -1465,7 +1578,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose square-root value should be found. +

The value of the parameter whose square-root value should be found.

INT
LONG
FLOAT
DOUBLE No @@ -1481,10 +1594,13 @@ from InValueStream select math:sqrt(inValue) as sqrtValue insert into OutMediationStream; ``` -

The function calculates the square-root value of the 'inValue' and directs the output to the output stream, 'OutMediationStream'. For example, sqrt(4d) returns 2.

- -### tan *(Function)* -

This function returns the tan of the given value in radians. It wraps the java.lang.Math.tan() function.

+

+

The function calculates the square-root value of the 'inValue' and directs the output to the output stream, 'OutMediationStream'. For example, sqrt(4d) returns 2.

+

+### tan *(Function)* +

+

This function returns the tan of the given value in radians. It wraps the java.lang.Math.tan() function.

+

Syntax ``` @@ -1503,7 +1619,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose tan value should be found. Input is required to be in radians. +

The value of the parameter whose tan value should be found. Input is required to be in radians.

INT
LONG
FLOAT
DOUBLE No @@ -1519,10 +1635,13 @@ from InValueStream select math:tan(inValue) as tanValue insert into OutMediationStream; ``` -

This function calculates the tan value of the 'inValue' given and directs the output to the output stream, 'OutMediationStream'. For example, tan(6d) returns -0.29100619138474915.

- -### tanh *(Function)* -

This function returns the hyperbolic tangent of the value given in radians. It wraps the java.lang.Math.tanh() function.

+

+

This function calculates the tan value of the 'inValue' given and directs the output to the output stream, 'OutMediationStream'. For example, tan(6d) returns -0.29100619138474915.

+

+### tanh *(Function)* +

+

This function returns the hyperbolic tangent of the value given in radians. It wraps the java.lang.Math.tanh() function.

+

Syntax ``` @@ -1541,7 +1660,7 @@ insert into OutMediationStream; p1 - The value of the parameter whose hyperbolic tangent value should be found. Input is required to be in radians. +

The value of the parameter whose hyperbolic tangent value should be found. Input is required to be in radians.

INT
LONG
FLOAT
DOUBLE No @@ -1557,10 +1676,13 @@ from InValueStream select math:tanh(inValue) as tanhValue insert into OutMediationStream; ``` -

If the 'inVaue' in the input stream is given, this function calculates the hyperbolic tangent value of the same and directs the output to 'OutMediationStream' stream. For example, tanh(6d) returns 0.9999877116507956.

- -### toDegrees *(Function)* -

This function converts the value given in radians to degrees. It wraps the java.lang.Math.toDegrees() function.

+

+

If the 'inVaue' in the input stream is given, this function calculates the hyperbolic tangent value of the same and directs the output to 'OutMediationStream' stream. For example, tanh(6d) returns 0.9999877116507956.

+

+### toDegrees *(Function)* +

+

This function converts the value given in radians to degrees. It wraps the java.lang.Math.toDegrees() function.

+

Syntax ``` @@ -1579,7 +1701,7 @@ insert into OutMediationStream; p1 - The input value in radians that should be converted to degrees. +

The input value in radians that should be converted to degrees.

INT
LONG
FLOAT
DOUBLE No @@ -1595,10 +1717,13 @@ from InValueStream select math:toDegrees(inValue) as degreesValue insert into OutMediationStream; ``` -

The function converts the 'inValue' in the input stream from radians to degrees and directs the output to 'OutMediationStream' output stream. For example, toDegrees(6d) returns 343.77467707849394.

- -### toRadians *(Function)* -

This function converts the value given in degrees to radians. It wraps the java.lang.Math.toRadians() function.

+

+

The function converts the 'inValue' in the input stream from radians to degrees and directs the output to 'OutMediationStream' output stream. For example, toDegrees(6d) returns 343.77467707849394.

+

+### toRadians *(Function)* +

+

This function converts the value given in degrees to radians. It wraps the java.lang.Math.toRadians() function.

+

Syntax ``` @@ -1617,7 +1742,7 @@ insert into OutMediationStream; p1 - The input value in degrees that should be converted to radians. +

The input value in degrees that should be converted to radians.

INT
LONG
FLOAT
DOUBLE No @@ -1633,5 +1758,6 @@ from InValueStream select math:toRadians(inValue) as radiansValue insert into OutMediationStream; ``` -

This function converts the input, from degrees to radians and directs the result to 'OutMediationStream' output stream. For example, toRadians(6d) returns 0.10471975511965977.

- +

+

This function converts the input, from degrees to radians and directs the result to 'OutMediationStream' output stream. For example, toRadians(6d) returns 0.10471975511965977.

+

diff --git a/docs/index.md b/docs/index.md index 71ab08d..12527b1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,8 +2,8 @@ Siddhi Execution Math ====================================== [![Jenkins Build Status](https://wso2.org/jenkins/job/siddhi/job/siddhi-execution-math/badge/icon)](https://wso2.org/jenkins/job/siddhi/job/siddhi-execution-math/) - [![GitHub (pre-)Release](https://img.shields.io/github/release/siddhi-io/siddhi-execution-math/all.svg)](https://github.com/siddhi-io/siddhi-execution-math/releases) - [![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/siddhi-io/siddhi-execution-math.svg)](https://github.com/siddhi-io/siddhi-execution-math/releases) + [![GitHub Release](https://img.shields.io/github/release/siddhi-io/siddhi-execution-math.svg)](https://github.com/siddhi-io/siddhi-execution-math/releases) + [![GitHub Release Date](https://img.shields.io/github/release-date/siddhi-io/siddhi-execution-math.svg)](https://github.com/siddhi-io/siddhi-execution-math/releases) [![GitHub Open Issues](https://img.shields.io/github/issues-raw/siddhi-io/siddhi-execution-math.svg)](https://github.com/siddhi-io/siddhi-execution-math/issues) [![GitHub Last Commit](https://img.shields.io/github/last-commit/siddhi-io/siddhi-execution-math.svg)](https://github.com/siddhi-io/siddhi-execution-math/commits/master) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) @@ -19,52 +19,52 @@ For information on Siddhi and i ## Latest API Docs -Latest API Docs is 5.0.3. +Latest API Docs is 5.0.4. ## Features -* percentile *(Aggregate Function)*

This functions returns the pth percentile value of a given argument.

-* abs *(Function)*

This function returns the absolute value of the given parameter. It wraps the java.lang.Math.abs() function.

-* acos *(Function)*

If -1 <= p1 <= 1, this function returns the arc-cosine (inverse cosine) value of p1.If the domain is invalid, it returns NULL. The value returned is in radian scale. This function wraps the java.lang.Math.acos() function.

-* asin *(Function)*

If -1 <= p1 <= 1, this function returns the arc-sin (inverse sine) value of p1. If the domain is invalid, it returns NULL. The value returned is in radian scale. This function wraps the java.lang.Math.asin() function.

-* atan *(Function)*

1. If a single p1 is received, this function returns the arc-tangent (inverse tangent) value of p1.
2. If p1 is received along with an optional p1, it considers them as x and y coordinates and returns the arc-tangent (inverse tangent) value.
The returned value is in radian scale. This function wraps the java.lang.Math.atan() function.

-* bin *(Function)*

This function returns a string representation of the p1 argument, that is of either 'integer' or 'long' data type, as an unsigned integer in base 2. It wraps the java.lang.Integer.toBinaryString and java.lang.Long.toBinaryString` methods.

-* cbrt *(Function)*

This function returns the cube-root of 'p1' which is in radians. It wraps the java.lang.Math.cbrt() function.

-* ceil *(Function)*

This function returns the smallest double value, i.e., the closest to the negative infinity, that is greater than or equal to the p1 argument, and is equal to a mathematical integer. It wraps the java.lang.Math.ceil() method.

-* conv *(Function)*

This function converts a from the fromBase base to the toBase base.

-* copySign *(Function)*

This function returns a value of an input with the received magnitude and sign of another input. It wraps the java.lang.Math.copySign() function.

-* cos *(Function)*

This function returns the cosine of p1 which is in radians. It wraps the java.lang.Math.cos() function.

-* cosh *(Function)*

This function returns the hyperbolic cosine of p1 which is in radians. It wraps the java.lang.Math.cosh() function.

-* e *(Function)*

This function returns the java.lang.Math.E constant, which is the closest double value to e, where e is the base of the natural logarithms.

-* exp *(Function)*

This function returns the Euler's number e raised to the power of p1. It wraps the java.lang.Math.exp() function.

-* floor *(Function)*

This function wraps the java.lang.Math.floor() function and returns the largest value, i.e., closest to the positive infinity, that is less than or equal to p1, and is equal to a mathematical integer.

-* 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.

-* hex *(Function)*

This function wraps the java.lang.Double.toHexString() function. It returns a hexadecimal string representation of the input, p1`.

-* isInfinite *(Function)*

This function wraps the java.lang.Float.isInfinite() and java.lang.Double.isInfinite() and returns true if p1 is infinitely large in magnitude and false if otherwise.

-* 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.

-* ln *(Function)*

This function returns the natural logarithm (base e) of p1.

-* log *(Function)*

This function returns the logarithm of the received number as per the given base.

-* log10 *(Function)*

This function returns the base 10 logarithm of p1.

-* log2 *(Function)*

This function returns the base 2 logarithm of p1.

-* max *(Function)*

This function returns the greater value of p1 and p2.

-* min *(Function)*

This function returns the smaller value of p1 and p2.

-* oct *(Function)*

This function converts the input parameter p1 to octal.

-* parseDouble *(Function)*

This function returns the double value of the string received.

-* parseFloat *(Function)*

This function returns the float value of the received string.

-* parseInt *(Function)*

This function returns the integer value of the received string.

-* parseLong *(Function)*

This function returns the long value of the string received.

-* pi *(Function)*

This 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.

-* power *(Function)*

This function raises the given value to a given power.

-* rand *(Function)*

This 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 internally use the java.util.Random class.

-* round *(Function)*

This function returns the value of the input argument rounded off to the closest integer/long value.

-* signum *(Function)*

This returns +1, 0, or -1 for the given positive, zero and negative values respectively. This function wraps the java.lang.Math.signum() function.

-* sin *(Function)*

This returns the sine of the value given in radians. This function wraps the java.lang.Math.sin() function.

-* sinh *(Function)*

This returns the hyperbolic sine of the value given in radians. This function wraps the java.lang.Math.sinh() function.

-* sqrt *(Function)*

This function returns the square-root of the given value. It wraps the java.lang.Math.sqrt()s function.

-* tan *(Function)*

This function returns the tan of the given value in radians. It wraps the java.lang.Math.tan() function.

-* tanh *(Function)*

This function returns the hyperbolic tangent of the value given in radians. It wraps the java.lang.Math.tanh() function.

-* toDegrees *(Function)*

This function converts the value given in radians to degrees. It wraps the java.lang.Math.toDegrees() function.

-* toRadians *(Function)*

This function converts the value given in degrees to radians. It wraps the java.lang.Math.toRadians() function.

+* percentile *(Aggregate Function)*

This functions returns the pth percentile value of a given argument.

+* abs *(Function)*

This function returns the absolute value of the given parameter. It wraps the java.lang.Math.abs() function.

+* acos *(Function)*

If -1 <= p1 <= 1, this function returns the arc-cosine (inverse cosine) value of p1.If the domain is invalid, it returns NULL. The value returned is in radian scale. This function wraps the java.lang.Math.acos() function.

+* asin *(Function)*

If -1 <= p1 <= 1, this function returns the arc-sin (inverse sine) value of p1. If the domain is invalid, it returns NULL. The value returned is in radian scale. This function wraps the java.lang.Math.asin() function.

+* atan *(Function)*

1. If a single p1 is received, this function returns the arc-tangent (inverse tangent) value of p1.
2. If p1 is received along with an optional p1, it considers them as x and y coordinates and returns the arc-tangent (inverse tangent) value.
The returned value is in radian scale. This function wraps the java.lang.Math.atan() function.

+* bin *(Function)*

This function returns a string representation of the p1 argument, that is of either 'integer' or 'long' data type, as an unsigned integer in base 2. It wraps the java.lang.Integer.toBinaryString and java.lang.Long.toBinaryString` methods.

+* cbrt *(Function)*

This function returns the cube-root of 'p1' which is in radians. It wraps the java.lang.Math.cbrt() function.

+* ceil *(Function)*

This function returns the smallest double value, i.e., the closest to the negative infinity, that is greater than or equal to the p1 argument, and is equal to a mathematical integer. It wraps the java.lang.Math.ceil() method.

+* conv *(Function)*

This function converts a from the fromBase base to the toBase base.

+* copySign *(Function)*

This function returns a value of an input with the received magnitude and sign of another input. It wraps the java.lang.Math.copySign() function.

+* cos *(Function)*

This function returns the cosine of p1 which is in radians. It wraps the java.lang.Math.cos() function.

+* cosh *(Function)*

This function returns the hyperbolic cosine of p1 which is in radians. It wraps the java.lang.Math.cosh() function.

+* e *(Function)*

This function returns the java.lang.Math.E constant, which is the closest double value to e, where e is the base of the natural logarithms.

+* exp *(Function)*

This function returns the Euler's number e raised to the power of p1. It wraps the java.lang.Math.exp() function.

+* floor *(Function)*

This function wraps the java.lang.Math.floor() function and returns the largest value, i.e., closest to the positive infinity, that is less than or equal to p1, and is equal to a mathematical integer.

+* 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.

+* hex *(Function)*

This function wraps the java.lang.Double.toHexString() function. It returns a hexadecimal string representation of the input, p1`.

+* isInfinite *(Function)*

This function wraps the java.lang.Float.isInfinite() and java.lang.Double.isInfinite() and returns true if p1 is infinitely large in magnitude and false if otherwise.

+* 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.

+* ln *(Function)*

This function returns the natural logarithm (base e) of p1.

+* log *(Function)*

This function returns the logarithm of the received number as per the given base.

+* log10 *(Function)*

This function returns the base 10 logarithm of p1.

+* log2 *(Function)*

This function returns the base 2 logarithm of p1.

+* max *(Function)*

This function returns the greater value of p1 and p2.

+* min *(Function)*

This function returns the smaller value of p1 and p2.

+* oct *(Function)*

This function converts the input parameter p1 to octal.

+* parseDouble *(Function)*

This function returns the double value of the string received.

+* parseFloat *(Function)*

This function returns the float value of the received string.

+* parseInt *(Function)*

This function returns the integer value of the received string.

+* parseLong *(Function)*

This function returns the long value of the string received.

+* pi *(Function)*

This 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.

+* power *(Function)*

This function raises the given value to a given power.

+* rand *(Function)*

This 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 internally use the java.util.Random class.

+* round *(Function)*

This function returns the value of the input argument rounded off to the closest integer/long value.

+* signum *(Function)*

This returns +1, 0, or -1 for the given positive, zero and negative values respectively. This function wraps the java.lang.Math.signum() function.

+* sin *(Function)*

This returns the sine of the value given in radians. This function wraps the java.lang.Math.sin() function.

+* sinh *(Function)*

This returns the hyperbolic sine of the value given in radians. This function wraps the java.lang.Math.sinh() function.

+* sqrt *(Function)*

This function returns the square-root of the given value. It wraps the java.lang.Math.sqrt()s function.

+* tan *(Function)*

This function returns the tan of the given value in radians. It wraps the java.lang.Math.tan() function.

+* tanh *(Function)*

This function returns the hyperbolic tangent of the value given in radians. It wraps the java.lang.Math.tanh() function.

+* toDegrees *(Function)*

This function converts the value given in radians to degrees. It wraps the java.lang.Math.toDegrees() function.

+* toRadians *(Function)*

This function converts the value given in degrees to radians. It wraps the java.lang.Math.toRadians() function.

## Dependencies diff --git a/mkdocs.yml b/mkdocs.yml index 98805f5..70558d5 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -34,6 +34,7 @@ pages: - Information: index.md - API Docs: - latest: api/latest.md + - 5.0.4: api/5.0.4.md - 5.0.3: api/5.0.3.md - 5.0.2: api/5.0.2.md - 5.0.1: api/5.0.1.md