Skip to content

Latest commit

 

History

History
107 lines (79 loc) · 3.2 KB

atan-transact-sql.md

File metadata and controls

107 lines (79 loc) · 3.2 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
ATAN (Transact-SQL)
ATAN (Transact-SQL)
markingmyname
maghan
07/24/2017
sql
t-sql
reference
ATAN_TSQL
ATAN
arctangent
ATAN function
tangent
TSQL
>= aps-pdw-2016 || = azuresqldb-current || = azure-sqldw-latest || >= sql-server-2016 || >= sql-server-linux-2017 || = azuresqldb-mi-current||=fabric

ATAN (Transact-SQL)

[!INCLUDE sql-asdb-asdbmi-asa-pdw-fabricse-fabricdw]

A function that returns the angle, in radians, whose tangent is a specified float expression. This is also called arctangent.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

ATAN ( float_expression )  

Arguments

float_expression
An expression of either type float or of a type that implicitly convert to float.

Return types

float

Examples

This example takes a float expression and returns the ATAN of the specified angle.

SELECT 'The ATAN of -45.01 is: ' + CONVERT(varchar, ATAN(-45.01))  
SELECT 'The ATAN of -181.01 is: ' + CONVERT(varchar, ATAN(-181.01))  
SELECT 'The ATAN of 0 is: ' + CONVERT(varchar, ATAN(0))  
SELECT 'The ATAN of 0.1472738 is: ' + CONVERT(varchar, ATAN(0.1472738))  
SELECT 'The ATAN of 197.1099392 is: ' + CONVERT(varchar, ATAN(197.1099392))  
GO  

[!INCLUDEssResult]

  
-------------------------------   
The ATAN of -45.01 is: -1.54858                         
  
(1 row(s) affected)  
  
--------------------------------   
The ATAN of -181.01 is: -1.56527                         
  
(1 row(s) affected)  
  
--------------------------------   
The ATAN of 0 is: 0                                
  
(1 row(s) affected)  
  
----------------------------------   
The ATAN of 0.1472738 is: 0.146223                         
  
(1 row(s) affected)  
  
-----------------------------------   
The ATAN of 197.1099392 is: 1.56572                          
  
(1 row(s) affected)  

Examples: [!INCLUDEssazuresynapse-md] and [!INCLUDEssPDW]

This example takes a float expression and returns the arctangent of the specified angle.

SELECT ATAN(45.87) AS atanCalc1,  
    ATAN(-181.01) AS atanCalc2,  
    ATAN(0) AS atanCalc3,  
    ATAN(0.1472738) AS atanCalc4,  
    ATAN(197.1099392) AS atanCalc5;  

[!INCLUDEssResult]

atanCalc1  atanCalc2  atanCalc3  atanCalc4  atanCalc5
---------  ---------  ---------  ---------  ---------
1.55       -1.57       0.00       0.15       1.57

See also

CEILING (Transact-SQL)
Mathematical Functions (Transact-SQL)