3Fh FN$SIN calculate sine
Input Floating-point argument on the stack.
Output Floating-point result on the stack.

Returns the sine of the floating-point number (assumed to be radians) on the run-time stack. The stack pointer (RTA_SP) remains unchanged.

Error 247 is returned if the argument is greater than 3141592 or less than -3141592.

See also: technical manual > utility system services > floating point numbers

Example The following subroutine will return the sine of 3.1416 (PI to 4 decimal places) in FN_RESULT.
        LDD     RTA_SP:
        SUBD    #8              ;make room for argument on stack
        STD     RTA_SP:         ;D now has destination for UT$CPYB
        LDX     #8              ;length for copying argument
        STX     UTW_S0:
        LDX     #FN_ARG         ;source address for UT$CPYB
        OS      UT$CPYB         ;copy argument to stack
        OS      FN$SIN
        LDX     RTA_SP:         ;source address for copying result
        LDD     #8
        STD     UTW_S0:         ;length for copying result
        ADDD    RTA_SP:         ;add 8 to stack pointer
        STD     RTA_SP:         ;restore stack pointer
        LDD     #FN_RESULT      ;destination for copy
        OS      UT$CPYB

        DB      0,0,0,60h,41h,31h,0,0

        DS      8
FN_RESULT will contain the floating-point result -7.34641020669E-06.
Errors 247 - bad argument in function call