MTH$CLOG        COMPLEX LOGARITHM                                21-AUG-1978 19:02:30   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (2)      90  HISTORY		; Detailed Current Edit History

   (3)      96  DECLARATIONS

   (4)     125  MTH$CLOG

MTH$CLOG        COMPLEX LOGARITHM                                21-AUG-1978 19:02:30   VAX-11 MACRO X0.3-11               Page   1

0-2                                                                                                                              (1)



                                     0000     1 	.TITLE	MTH$CLOG	COMPLEX LOGARITHM

                                     0000     2 	.IDENT	/0-2/		; File: MTHCLOG.MAR

                                     0000     3 

                                     0000     4 ;

                                     0000     5 ; Copyright (C) 1977

                                     0000     6 ; Digital Equipment Corporation, Maynard, Massachusetts 01754

                                     0000     7 ;

                                     0000     8 ; This software is furnished under a license for use only on a single

                                     0000     9 ; computer  system  and  may be copied only with the inclusion of the

                                     0000    10 ; above copyright notice. This software, or any other copies thereof,

                                     0000    11 ; may not be provided or otherwise made available to any other person

                                     0000    12 ; except for use on such system and to one who agree to these license 

                                     0000    13 ; terms.  Title to  and  ownership of the software shall at all times 

                                     0000    14 ; remain in DEC.

                                     0000    15 ;

                                     0000    16 ; The information in the software is subject to change without notice

                                     0000    17 ; and should  not  be construed  as a commitment by Digital Equipment 

                                     0000    18 ; Corporation.

                                     0000    19 ;

                                     0000    20 ; DEC assumes  no  responsibility  for the use or  reliability of its

                                     0000    21 ; software on equipment which is not supplied by DEC.

                                     0000    22 ;

                                     0000    23 ;

                                     0000    24 ; FACILITY: MATH LIBRARY

                                     0000    25 ;++

                                     0000    26 ; ABSTRACT:

                                     0000    27 ;

                                     0000    28 ;	This module contains routine MTH$CLOG - perform complex log

                                     0000    29 ;

                                     0000    30 ;--

                                     0000    31 ;

                                     0000    32 ; VERSION: 0

                                     0000    33 ;

                                     0000    34 ; HISTORY:

                                     0000    35 ;

                                     0000    36 ; AUTHOR:

                                     0000    37 ;	Jonathan M. Taylor, 19-JUL-77: Version 0

                                     0000    38 ;

                                     0000    39 ; MODIFIED BY:

                                     0000    40 ;

                                     0000    41 ;

                                     0000    42 ;

MTH$CLOG        COMPLEX LOGARITHM                                21-AUG-1978 19:02:30   VAX-11 MACRO X0.3-11               Page   2

0-2             HISTORY  ; Detailed Current Edit History                                                                         (2)



                                     0000    44 	.SBTTL	HISTORY		; Detailed Current Edit History

                                     0000    45 

                                     0000    46 

                                     0000    47 ; Edit History for Version 0 of MTH$CLOG

                                     0000    48 ;

MTH$CLOG        COMPLEX LOGARITHM                                21-AUG-1978 19:02:30   VAX-11 MACRO X0.3-11               Page   3

0-2             DECLARATIONS                                                                                                     (3)



                                     0000    50 	.SBTTL	DECLARATIONS

                                     0000    51 

                                     0000    52 ;

                                     0000    53 ; INCLUDE FILES:

                                     0000    54 ;	OERR.MAR

                                     0000    55 

                                     0000    56 ;

                                     0000    57 ; EXTERNAL SYMBOLS:

                                     0000    58 	.GLOBL	MTH$ATAN2

                                     0000    59 	.GLOBL	MTH$CABS

                                     0000    60 	.GLOBL	MTH$ALOG_R5

                                     0000    61 

                                     0000    62 ;

                                     0000    63 ; MACROS:

                                     0000    64 ;	NONE

                                     0000    65 

                                     0000    66 ;

                                     0000    67 ; PSECT DECLARATIONS:

                                     0000    68 ;

                                 00000000    69 	.PSECT	MTH$CODE	PIC, SHR, LONG, EXE, NOWRT

                                     0000    70 

                                     0000    71 ;

                                     0000    72 ; EQUATED SYMBOLS:

                           00000004  0000    73 	argadr	=	4		; offset from AP to find arg adr

                                     0000    74 

                                     0000    75 ;

                                     0000    76 ; OWN STORAGE:

                                     0000    77 ;	NONE

MTH$CLOG        COMPLEX LOGARITHM                                21-AUG-1978 19:02:30   VAX-11 MACRO X0.3-11               Page   4

0-2             MTH$CLOG                                                                                                         (4)



                                     0000    79 	.SBTTL	MTH$CLOG

                                     0000    80 

                                     0000    81 ;++

                                     0000    82 ; FUNCTIONAL DESCRIPTION:

                                     0000    83 ;

                                     0000    84 ;	The Natural Logaritm of a complex number (r, i) is

                                     0000    85 ;	computed as follows:

                                     0000    86 ;

                                     0000    87 ;		CLOG(r, i) = (ALOG(CABS(r, i)), ATAN2(i, r))

                                     0000    88 ;

                                     0000    89 ; CALLING SEQUENCE:

                                     0000    90 ;	Natural_log.wfc.v = MTH$CLOG(arg.rfc.r)

                                     0000    91 ;

                                     0000    92 ;

                                     0000    93 ; INPUT PARAMETERS:

                                     0000    94 ;	The one parameter is the address of a complex number (r, i),

                                     0000    95 ;	where r and i are both single-precision floating point values.

                                     0000    96 ;

                                     0000    97 ; IMPLICIT INPUTS:

                                     0000    98 ;	NONE

                                     0000    99 ;

                                     0000   100 ; OUTPUT PARAMETERS:

                                     0000   101 ;	NONE

                                     0000   102 ;

                                     0000   103 ; IMPLICIT OUTPUTS:

                                     0000   104 ;	NONE

                                     0000   105 ;

                                     0000   106 ; COMPLETION CODES:

                                     0000   107 ;	NONE

                                     0000   108 ;

                                     0000   109 ; SIDE EFFECTS:

                                     0000   110 ;	Signals	Reserved Operand if the input parameter is bad (-0.0)

                                     0000   111 ;

                                     0000   112 ;--

                                     0000   113 

                                     0000   114 

                               007C' 0000   115 	.ENTRY	MTH$CLOG,	^M<R2,R3,R4,R5,R6>

                                     0002   116 	MTH$FLAG_JACKET			; set up error handler

                                     0002      

            6D       0000'CF     3E  0002       	MOVAW	W^MTH$$JACKET_HND, (FP)

                                     0007       					; set handler address to jacket

                                     0007       					; handler

                                     0007       

            50         04 AC     D0  0007   117 	MOVL	argadr(AP), R0		; R0 -> (r, i)

                          80     DF  000B   118 	PUSHAF	(R0)+			; push addr(r)

                          50     DD  000D   119 	PUSHL	R0			; push addr(i)

   00000000'EF            02     FB  000F   120 	CALLS	#2, MTH$ATAN2		; R0 = ATAN2(i, r)

            56            50     D0  0016   121 	MOVL	R0, R6			; R6 = ATAN2(i, r)

   00000000'EF            6C     FA  0019   122 	CALLG	(AP), MTH$CABS		; R0 = CABS((r, i))

                 00000000'EF     16  0020   123 	JSB	MTH$ALOG_R5		; R0 = ALOG(CABS((r, i)))

            51            56     D0  0026   124 	MOVL	R6, R1			; R1 = ATAN2(i, r)

                                 04  0029   125 	RET

                                     002A   126 

                                     002A   127 

                                     002A   128 	.END

MTH$CLOG        COMPLEX LOGARITHM                                21-AUG-1978 19:02:30   VAX-11 MACRO X0.3-11               Page   5

SYMBOL TABLE                                                                                                                     (4)



ARGADR         = 00000004            

FOR$K_ERR_PREFX= 00000018            

MTH$$JACKET_HND  ********   X   02   

MTH$ALOG_R5      ********  GX   01   

MTH$ATAN2        ********  GX   01   

MTH$CABS         ********  GX   01   

MTH$CLOG         00000000 RG    02   

MTH$K_ERR_PREFX= 00000016            

MTH__FLOOVEMAT = 00000058            

MTH__FLOUNDMAT = 00000059            

MTH__INVARG    = 00000051            

MTH__LOGZERNEG = 00000053            

MTH__SINSIGLOS = 00000057            

MTH__SQUROONEG = 00000054            

MTH__UNDEXP    = 00000052            

MTH__WRONUMARG = 00000050            





PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

MTH$CODE         0000002A      02       PIC   USR   CON   REL   LCL   SHR   EXE   RD  NOWRT LONG  





THERE WERE NO ERRORS OR WARNINGS.

27964. BYTES LEFT IN FREE MEMORY POOL.

OBJ$:MTHCLOG,LIS$:MTHCLOG/-SP=LIB$:S/ML,SRC$:P,MTHCLOG

0 MLB DIR RDS - 0 GETS TO DEFINE 0 MACROS. 2 INTER. FILE WRITES. 

