Apache Tajo - Math Functions


Advertisements


Math functions operate on mathematical formulae. The following table describes the list of functions in detail.

S.No. Function & Description
1 abs(x)

Returns the absolute value of x.

2 cbrt(x)

Returns the cube root of x.

3 ceil(x)

Returns x value rounded up to the nearest integer.

4 floor(x)

Returns x rounded down to the nearest integer.

5 pi()

Returns pi value. Result will be returned as double value.

6 radians(x)

converts the angle x in degree radians.

7 degrees(x)

Returns degree value for x.

8 pow(x,p)

Returns power of value‘p’ to the x value.

9 div(x,y)

Returns the division result for the given two x,y integer values.

10 exp(x)

Returns Euler’s number e raised to the power of a number.

11 sqrt(x)

Returns the square root of x.

12 sign(x)

Returns the signum function of x, that is −

  • 0 if the argument is 0

  • 1 if the argument is greater than 0

  • 1 if the argument is less than 0

13 mod(n,m)

Returns the modulus (remainder) of n divided by m.

14 round(x)

Returns the rounded value for x.

15 cos(x)

Returns the cosine value(x).

16 asin(x)

Returns the inverse sine value(x).

17 acos(x)

Returns the inverse cosine value(x).

18 atan(x)

Returns the inverse tangent value(x).

19 atan2(y,x)

Returns the inverse tangent value(y/x).

Data Type Functions

The following table lists out the data type functions available in Apache Tajo.

S.No. Function & Description
1 to_bin(x)

Returns the binary representation of integer.

2 to_char(int,text)

Converts integer to string.

3 to_hex(x)

Converts the x value into hexadecimal.



Advertisements
E-Books Store