Progress
SQL-92
Guide and Reference


ATAN Function

Returns the arctangent of expression.

SYNTAX

ATAN ( expression ) 

EXAMPLE

The following example illustrates two ways to use the ATAN function:

select atan (1) * (180/ pi()) ’Arctangent in degrees’ from syscalctable;
 
ARCTANGENT IN DEGREES
----------------------- 
45.000000000000000
 
1 record selected
 
 
select atan (1) ’Arctangent in radians’ from syscalctable;
 
ARCTANGENT IN RADIANS
----------------------- 
0.785398163397448
 
1 record selected 

ATAN takes the ratio (expression) of two sides of a right triangle and returns the corresponding angle. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle.

The result is expressed in radians and is in the range -Pi/2 to Pi/2 radians. To convert degrees to radians, multiply degrees by Pi/180. To convert radians to degrees, multiply radians by 180/Pi.

NOTES

COMPATIBILITY

ODBC Compatible


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095