Previous Topic Next topic Print topic


ATAN Function

Purpose

Returns the arc tangent of an arithmetic expression.

Syntax

ATAN(x,[y])

Parameters

x and y are floating-point values such that y is not zero, or are expressions that can be converted to such values.

Description

ATAN(x) returns the arc tangent of x. The result is such that -Π/2 ≤ ATAN(x) ≤ Π/2. The result is expressed in radians and has the same data type as x.

ATAN(x,y) returns the arc tangent of x/y. The result is such that if x/y ≥ 0, then 0 ≤ ATAN(x,y) ≤ Π; and, if x/y < 0, then -Π ≤ ATAN(x,y) ≤ 0. The result is expressed in radians and has the same data type as x/y, and has the maximum precision of xand y.

Examples

X = 3.14157;
Y = 2.0;
RADIANS = ATAN(X);   /* 1.26 */

or

RADIANS ATAN(X,Y);  /* 1.00 */

Restrictions

An ATAN operation on Float Decimal data is actually performed using its Float Binary equivalent. Thus, the ranges of the operands and the result are limited to the range of Float Binary data.

Previous Topic Next topic Print topic