beautypg.com

Signum function, Sin function, Signum( a ) – Delta RMC151 User Manual

Page 380: Sin( a )

background image

RMC70/150 and RMCTools User Manual

n (DINT)
The number of times to shift a. n must be between 0 and 31.

Return Value

Returns the same data type as a.

Remarks

The result of an invalid n is undefined.

Examples

SHR(16#00000008, 2) returns 16#00000002

5.14.2.39. SIGNUM Function

SIGNUM(a)
Returns -1 if a is negative, +1 if a is positive, and 0 if a is zero.

Parameters

a (REAL or DINT)
The input value.

Return Value

The same data type as a.

Examples

SIGNUM(0.001) returns 1.0
SIGNUM(0.0) returns 0.0
SIGNUM(-100) returns -1

5.14.2.40. SIN Function

SIN(a)
Returns the sine of a.

Parameters

a (REAL)
The input value in radians.

Return Value

Returns a REAL.

Remarks

Notice a is in radians. To convert a value from degrees to radians, multiply the degrees

value by

π

/180. The RMC has an M_PI constant for

π

.

Examples

SIN(1.5707964) returns 1.0

360

Delta Computer Systems, Inc.

This manual is related to the following products: