docs.intersystems.com
Home  /  Application Development: Core Topics  /  InterSystems SQL Reference  /  SQL Functions  /  ATAN


InterSystems SQL Reference
ATAN
[Back]  [Next] 
InterSystems: The power behind what matters   
Search:  


A scalar numeric function that returns the arc-tangent, in radians, of the tangent of an angle.
Synopsis
{fn ATAN(numeric-expression)}
Arguments
numeric-expression A numeric expression. This is the tangent of the angle.
ATAN returns either the NUMERIC or DOUBLE data type. If numeric-expression is data type DOUBLE, ATAN returns DOUBLE; otherwise, it returns NUMERIC.
Description
ATAN takes any numeric value and returns the inverse (arc) of the tangent of an angle as a floating point number. ATAN returns NULL if passed a NULL value. ATAN treats nonnumeric strings, including the empty string (''), as the numeric value 0.
ATAN returns a value with a precision of 36 and a scale of 18.
ATAN can only be used as an ODBC scalar function (with the curly brace syntax).
You can use the DEGREES function to convert radians to degrees. You can use the RADIANS function to convert degrees to radians.
Example
The following example shows the effect of ATAN:
SELECT {fn ATAN(0.52)} AS ArcTangent 
returns 0.47951929199...
See Also