Trigonometric Functions

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Functions for computing trigonometric values. All arguments are in radians.

Functions 

Function (radians)Description
acos(x)inverse cosine
asin(x)inverse sine
atan(x)inverse tangent
atan2(y, x)inverse tangent of y/x
cos(x)cosine
cot(x)cotangent
sin(x)sine
tan(x)tangent

Returns 

All trigonometric functions return values of type double precision.

Considerations 

  • Arguments are expressed in radians. To convert degrees to radians, use RADIANS.
  • asin and acos require arguments in the range -1 to 1. An out-of-range argument returns an error.
  • cot(0) returns Infinity.

Examples 

Compute a Cosine 

Compute the cosine of an angle in radians.

1SELECT cos(0) AS result;

Returns 1.

Use PI to Express an Angle 

Combine pi with a trigonometric function.

1SELECT cot(0.25 * pi()) AS result;

Returns 1.

Related Documentation 

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!