DataBasic Reference > Statements and Intrinsic Functions > T > TAN Function

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

RealityV15.1Online Documentation (MoTW) Revision 7

TAN Function (DataBasic) (m618703+tan_f.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

TAN Function

Calculates the tangent of an angle.

Syntax

TAN(expression)

Syntax Elements

expression is any DataBasic expression that evaluates to a value in degrees.

The relation between radians and degrees is: 2 Pi radians = 360 degrees.

Operation

If there is no PRECISION statement in the program, the value is returned rounded to the nearest four decimal places. Otherwise, the number of decimal places returned is as specified by the PRECISION statement.

In each case, the significant decimal places returned are the result of rounding. However, only up to five places are significant: if the PRECISION statement specifies a precision greater than five, trailing zeroes are appended to the five significant places so as to return the numbers of places specified.

Comments

Tangent is undefined for angles which are odd multiples of 90 degrees (90*1=90, 90*3=270, etc.). If the expression used is an odd multiple of 90, a warning message is displayed and a value of zero is returned.

Examples

ANGLE = 25
A = TAN(ANGLE)

Calculates the tangent of an angle of 25 degrees and assigns the value to A.

Y = TAN(30)

Assigns the tangent of an angle of 30 degrees to variable Y.

RealityV15.1 (MoTW) Revision 7Comment on this topic