Compatible with PostgreSQL, Hologres allows you to use standard PostgreSQL syntax for data development.

The following table describes the trigonometric functions supported by Hologres. The functions supported by Hologres are only a subset of the PostgreSQL functions. For more information about how to use these functions, see Mathematical Functions and Operators in the PostgreSQL documentation.
Function Description Example Result
acos(bigint) Returns the arc cosine of a number of the BIGINT data type, where the number can be a literal or an expression that evaluates to a number. acos(1) 0
acos(int) Returns the arc cosine of a number of the INT data type, where the number can be a literal or an expression that evaluates to a number. acos(1) 0
acos(float8) Returns the arc cosine of a number of the FLOAT8 data type, where the number can be a literal or an expression that evaluates to a number. acos(0.9) 0.451026811796262
acos(float4) Returns the arc cosine of a number of the FLOAT4 data type, where the number can be a literal or an expression that evaluates to a number. acos(0.9) 0.451026811796262
acos(numeric) Returns the arc cosine of a number of the NUMERIC data type, where the number can be a literal or an expression that evaluates to a number. acos(0.9) 0.451026811796262
asin(bigint) Returns the arc sine of a number of the BIGINT data type, where the number can be a literal or an expression that evaluates to a number. asin(1) 1.5707963267949
asin(int) Returns the arc sine of a number of the INT data type, where the number can be a literal or an expression that evaluates to a number. asin(1) 1.5707963267949
asin(float8) Returns the arc sine of a number of the FLOAT8 data type, where the number can be a literal or an expression that evaluates to a number. asin(1.0) 1.5707963267949
asin(float4) Returns the arc sine of a number of the FLOAT4 data type, where the number can be a literal or an expression that evaluates to a number. asin(1.0) 1.5707963267949
asin(numeric) Returns the arc sine of a number of the NUMERIC data type, where the number can be a literal or an expression that evaluates to a number. asin(1.0) 1.5707963267949
atan(bigint) Returns the arc tangent of a number of the BIGINT data type, where the number can be a literal or an expression that evaluates to a number. atan(2) 1.10714871779409
atan(int) Returns the arc tangent of a number of the INT data type, where the number can be a literal or an expression that evaluates to a number. atan(2) 1.10714871779409
atan(float8) Returns the arc tangent of a number of the FLOAT8 data type, where the number can be a literal or an expression that evaluates to a number. atan(2.0) 1.10714871779409
atan(float4) Returns the arc tangent of a number of the FLOAT4 data type, where the number can be a literal or an expression that evaluates to a number. atan(2.0) 1.10714871779409
atan(numeric) Returns the arc tangent of a number of the NUMERIC data type, where the number can be a literal or an expression that evaluates to a number. atan(2.0) 1.10714871779409
atan2(bigint y, bigint x) Returns the arc tangent of y divided by x, where both y and x are numbers of the BIGINT data type. The numbers can be literals or expressions that evaluate to numbers. atan(2, 1) 1.10714871779409
atan2(int y, int x) Returns the arc tangent of y divided by x, where both y and x are numbers of the INT data type. The numbers can be literals or expressions that evaluate to numbers. atan(2, 1) 1.10714871779409
atan2(float8 y, float8 x) Returns the arc tangent of y divided by x, where both y and x are numbers of the FLOAT8 data type. The numbers can be literals or expressions that evaluate to numbers. atan(2.0, 1.0) 1.10714871779409
atan2(float4 y, float4 x) Returns the arc tangent of y divided by x, where both y and x are numbers of the FLOAT4 data type. The numbers can be literals or expressions that evaluate to numbers. atan(2.0, 1.0) 1.10714871779409
atan2(numeric y, numeric x) Returns the arc tangent of y divided by x, where both y and x are numbers of the NUMERIC data type. The numbers can be literals or expressions that evaluate to numbers. atan(2.0, 1.0) 1.10714871779409
cos(bigint) Returns the cosine of a number of the BIGINT data type, where the number can be a literal or an expression that evaluates to a number. cos(2) -0.416146836547142
cos(int) Returns the cosine of a number of the INT data type, where the number can be a literal or an expression that evaluates to a number. cos(2) -0.416146836547142
cos(float8) Returns the cosine of a number of the FLOAT8 data type, where the number can be a literal or an expression that evaluates to a number. cos(2.0) -0.416146836547142
cos(float4) Returns the cosine of a number of the FLOAT4 data type, where the number can be a literal or an expression that evaluates to a number. cos(2.0) -0.416146836547142
cos(numeric) Returns the cosine of a number of the NUMERIC data type, where the number can be a literal or an expression that evaluates to a number. cos(2.0) -0.416146836547142
cot(bigint) Returns the cotangent of a number of the BIGINT data type, where the number can be a literal or an expression that evaluates to a number. cot(2) -0.457657554360286
cot(int) Returns the cotangent of a number of the INT data type, where the number can be a literal or an expression that evaluates to a number. cot(2) -0.457657554360286
cot(float8) Returns the cotangent of a number of the FLOAT8 data type, where the number can be a literal or an expression that evaluates to a number. cot(2.0) -0.457657554360286
cot(float4) Returns the cotangent of a number of the FLOAT4 data type, where the number can be a literal or an expression that evaluates to a number. cot(2.0) -0.457657554360286
cot(numeric) Returns the cotangent of a number of the NUMERIC data type, where the number can be a literal or an expression that evaluates to a number. cot(2.0) -0.457657554360286
sin(bigint) Returns the sine of a number of the BIGINT data type, where the number can be a literal or an expression that evaluates to a number. sin(2) 0.909297426825682
sin(int) Returns the sine of a number of the INT data type, where the number can be a literal or an expression that evaluates to a number. sin(2) 0.909297426825682
sin(float8) Returns the sine of a number of the FLOAT8 data type, where the number can be a literal or an expression that evaluates to a number. sin(2.0) 0.909297426825682
sin(float4) Returns the sine of a number of the FLOAT4 data type, where the number can be a literal or an expression that evaluates to a number. sin(2.0) 0.909297426825682
sin(numeric) Returns the sine of a number of the NUMERIC data type, where the number can be a literal or an expression that evaluates to a number. sin(2.0) 0.909297426825682
tan(bigint) Returns the tangent of a number of the BIGINT data type, where the number can be a literal or an expression that evaluates to a number. tan(2) -2.18503986326152
tan(int) Returns the tangent of a number of the INT data type, where the number can be a literal or an expression that evaluates to a number. tan(2) -2.18503986326152
tan(float8) Returns the tangent of a number of the FLOAT8 data type, where the number can be a literal or an expression that evaluates to a number. tan(2.0) -2.18503986326152
tan(float4) Returns the tangent of a number of the FLOAT4 data type, where the number can be a literal or an expression that evaluates to a number. tan(2.0) -2.18503986326152
tan(numeric) Returns the tangent of a number of the NUMERIC data type, where the number can be a literal or an expression that evaluates to a number. tan(2.0) -2.18503986326152