MTH$DSINH       ; Double Floating Hyperbolic Sine routine        21-AUG-1978 19:05:10   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (2)     100  HISTORY	; Detailed Current Edit History

   (3)     100  DECLARATIONS	; Declarative Part of Module

   (4)     100  MTH$DSINH  - Standard Double Precision Floating

MTH$DSINH       ; Double Floating Hyperbolic Sine routine        21-AUG-1978 19:05:10   VAX-11 MACRO X0.3-11               Page   1

0-4                                                                                                                              (1)



                                     0000   100 	.TITLE	MTH$DSINH 	; Double Floating Hyperbolic Sine routine

                                     0000   200 				; (DSINH)

                                     0000   300 	.IDENT /0-4/		; File: MTHDSINH.MAR

                                     0000   400 ;

                                     0000   500 ; Copyright (C) 1977

                                     0000   600 ; Digital Equipment Corporation, Maynard, Massachusetts 01754

                                     0000   700 ;

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

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

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

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

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

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

                                     0000  1400 ; remain in DEC.

                                     0000  1500 ;

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

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

                                     0000  1800 ; Corporation.

                                     0000  1900 ;

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

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

                                     0000  2200 ;

                                     0000  2300 ;

                                     0000  2400 ; FACILITY: MATH LIBRARY

                                     0000  2500 ;++

                                     0000  2600 ; ABSTRACT:

                                     0000  2700 ;

                                     0000  2800 ; MTH$DSINH is a function which returns the double floating hyperbolic sine

                                     0000  2900 ; of its double precision floating point argument. The call is standard

                                     0000  3000 ; call-by-reference.

                                     0000  3100 ;

                                     0000  3200 ;--

                                     0000  3300 ;

                                     0000  3400 ; VERSION: 01

                                     0000  3500 ;

                                     0000  3600 ; HISTORY:

                                     0000  3700 ; AUTHOR:

                                     0000  3800 ;	Peter Yuo, 29-Jun-77: Version 01

                                     0000  3900 ;

                                     0000  4000 ; MODIFIED BY:

                                     0000  4100 ;

                                     0000  4200 ;

                                     0000  4300 ;

MTH$DSINH       ; Double Floating Hyperbolic Sine routine        21-AUG-1978 19:05:10   VAX-11 MACRO X0.3-11               Page   2

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



                                     0000   100 	.SBTTL	HISTORY	; Detailed Current Edit History

                                     0000   200 

                                     0000   300 

                                     0000   400 ; ALGORITHMIC DIFFERENCES FROM FP-11/C ROUTINE:	none

                                     0000   500 ;

                                     0000   600 ; Edit History for Version 01 of MTH$DSINH 

                                     0000   700 ;

                                     0000   800 ; 0-2	MTH$$ERROR changed to MTH$$SIGNAL.

                                     0000   900 ;	MTH$_... changed to MTH__....

                                     0000  1000 ;	Changed error handling mechanism. Put error result in R0:R1 before

                                     0000  1100 ;	calling MTH$$SIGNAL in order to allow user modify error result.

                                     0000  1200 ;

                                     0000  1300 ; 0-3	Six term Taylor series, in powers of argument, replaced

                                     0000  1400 ;	by six term Chebyshev series, in powers of ARG**2,

                                     0000  1500 ;	with overhang provided. This improves accuracy. 18-May-1978;

                                     0000  1600 ;	Mary Payne.

                                     0000  1700 ; 0-4	Fix LOG(2) constant.  TNH 16-June-78

MTH$DSINH       ; Double Floating Hyperbolic Sine routine        21-AUG-1978 19:05:10   VAX-11 MACRO X0.3-11               Page   3

0-4             DECLARATIONS ; Declarative Part of Module                                                                        (3)



                                     0000   100 	.SBTTL	DECLARATIONS	; Declarative Part of Module

                                     0000   200 

                                     0000   300 ;

                                     0000   400 ; INCLUDE FILES:	OTSPARAMS.MAR

                                     0000   500 ;

                                     0000   600 ; EXTERNAL SYMBOLS:	MTH$JACKET_HDLR

                                     0000   700 ;

                                     0000   800 ; EQUATED SYMBOLS:

                                     0000   900 

                           00004000  0000  1000 	SD_0.5	= ^F0.5			; 0.5

                           00004080  0000  1100 	SD_1.0	= ^F1.0			; 1.0

                           00000004  0000  1200 	value	= 4			; value.rd.r

                                     0000  1300 

                                     0000  1400 ;

                                     0000  1500 ; MACROS:	none

                                     0000  1600 ;

                                     0000  1700 

                                     0000  1800 	$SRMDEF				; SRM$ symbol definitions

                                     0000  1900 

                                     0000  2000 ;

                                     0000  2100 ; PSECT DECLARATIONS:

                                     0000  2200 

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

                                     0000  2400 					; program section for math routines

                                     0000  2500 ;

                                     0000  2600 ; OWN STORAGE:	none

                                     0000  2700 ;

                                     0000  2800 ;

                                     0000  2900 ; CONSTANTS:

                                     0000  3000 ;

                                     0000  3100 

                                     0000  3200 D_0.25:

                0000 0000 0000 3F80  0000  3300 	.WORD	^X3F80, 0, 0, 0		; 0.25

                                     0008  3400 D_87.0:

                0000 0000 0000 43AE  0008  3500 	.WORD	^O041656, 0, 0, 0	; 87.0

                                     0010  3600 D_2_POWER_M27:

                0000 0000 0000 3300  0010  3700 	.WORD	^X3300, 0, 0, 0		; 2**-27

                                     0018  3800 D_LOG_2:

                CF7C F7D1 7217 4031  0018  3900 	.WORD	^O040061, ^O071027, ^O173721, ^O147574

                                     0020  4000 					; LOG(2)

                                     0020  4100 

                                     0020  4200 DSINHTAB:

                                     0020  4300 

                          746B 33D7  0020  4400 	.WORD	^O031727,^O072153

                          760F A336  0024  4500 	.WORD	^O121466,^O073017	; DECIMAL:   0.2508223608819151D-07

                          EF13 3738  0028  4600 	.WORD	^O033470,^O167423

                          64E0 D935  002C  4700 	.WORD	^O154465,^O062340	; DECIMAL: 0.2755729803646086D-05

                          0D00 3A50  0030  4800 	.WORD	^O035120,^O006400

                          43A1 D142  0034  4900 	.WORD	^O150502,^O041641	; DECIMAL: 0.1984126984813681D-03

                          8888 3D08  0038  5000 	.WORD	^O036410,^O104210

                          766A 8888  003C  5100 	.WORD	^O104210,^O073152	; DECIMAL: 0.8333333333332327D-02

                          AAAA 3F2A  0040  5200 	.WORD	^O037452,^O125252

                          AAAD AAAA  0044  5300 	.WORD	^O125252,^O125255	; DECIMAL: 0.1666666666666667D+00

                          0000 0000  0048  5400 	.WORD	0,0

                          0000 0000  004C  5500 	.WORD	0,0			; DECIMAL: 0.D0

                                     0050  5600   

                           00000006  0050  5700 DSINHLEN	= .- DSINHTAB/8

MTH$DSINH       ; Double Floating Hyperbolic Sine routine        21-AUG-1978 19:05:10   VAX-11 MACRO X0.3-11               Page   4

0-4             DECLARATIONS ; Declarative Part of Module                                                                        (3)



                                     0050  5800 

MTH$DSINH       ; Double Floating Hyperbolic Sine routine        21-AUG-1978 19:05:10   VAX-11 MACRO X0.3-11               Page   5

0-4             MTH$DSINH  - Standard Double Precision Floating                                                                  (4)



                                     0050   100 	.SBTTL	MTH$DSINH  - Standard Double Precision Floating DSINH

                                     0050   200 

                                     0050   300 

                                     0050   400 ;++

                                     0050   500 ; FUNCTIONAL DESCRIPTION:

                                     0050   600 ;

                                     0050   700 ; DSINH  - double precision floating point function

                                     0050   800 ;

                                     0050   900 ; DSINH(X) is computed as:

                                     0050  1000 ;

                                     0050  1100 ;	If |X| < 2**-27, DSINH(X) = X.

                                     0050  1200 ;	IF 2**-27 =< |X| < 0.25, DSINH(X) = Chebyshev Series.

                                     0050  1300 ;	If 0.25 =< |X| =< 87.0, DSINH(X) = (DEXP(X) - DEXP(-X))/2.

                                     0050  1400 ;	If 87.0 < |X| and |X| - LOG(2) < 87, then DSINH(X) = sign(X)* DEXP(|X|-LOG(2)).

                                     0050  1500 ;	If 87.0 < |X| and |X| - LOG(2) >= 87, then overflow.

                                     0050  1600 ;

                                     0050  1700 ; CALLING SEQUENCE:

                                     0050  1800 ;

                                     0050  1900 ;	DSINH.wd.v = MTH$DSINH(x.rd.r)

                                     0050  2000 ;

                                     0050  2100 ; INPUT PARAMETERS:

                                     0050  2200 

                           00000004  0050  2300 	LONG = 4			; define longword multiplier

                           00000004  0050  2400 	x = 1 * LONG			; Contents of x is the argument

                                     0050  2500 

                                     0050  2600 ; IMPLICIT INPUTS:	none

                                     0050  2700 ;

                                     0050  2800 ; OUTPUT PARAMETERS:

                                     0050  2900 ;

                                     0050  3000 ;	VALUE:	double precision floating hyperbolic sine of the argument

                                     0050  3100 ;

                                     0050  3200 ; IMPLICIT OUTPUTS:	none

                                     0050  3300 ;

                                     0050  3400 ; COMPLETION CODES:	none

                                     0050  3500 ;

                                     0050  3600 ; SIDE EFFECTS:

                                     0050  3700 ;

                                     0050  3800 ; Signal: MTH$_FLOOVEMAT if 87+LOG(2) < |X| with reserved operand in R0/R1

                                     0050  3900 ; (copied to the signal mechanism vector CHF$L_MCH_R0/R1 by LIB$SIGNAL).

                                     0050  4000 ; Associated message is: "FLOATING OVERFLOW IN MATH LIBRARY". Result is reserved

                                     0050  4100 ; operand -0.0 unless a user supplied (or any) error handler changes CHF$L_MCH_R0/R1

                                     0050  4200 ;

                                     0050  4300 ; NOTE: This procedure disables floating point underflow, enables integer

                                     0050  4400 ; overflow.

                                     0050  4500 ;

                                     0050  4600 ;---

                                     0050  4700 

                                     0050  4800 

                               40FC' 0050  4900 	.ENTRY	MTH$DSINH, ^M<IV, R2, R3, R4, R5, R6, R7>

                                     0052  5000 					; standard call-by-reference entry

                                     0052  5100 					; disable DV (and FU), enable IV

                                     0052  5200 	MTH$FLAG_JACKET			; flag that this is a jacket procedure in

                                     0052      

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

                                     0057       					; set handler address to jacket

                                     0057       					; handler

                                     0057       

MTH$DSINH       ; Double Floating Hyperbolic Sine routine        21-AUG-1978 19:05:10   VAX-11 MACRO X0.3-11               Page   6

0-4             MTH$DSINH  - Standard Double Precision Floating                                                                  (4)



                                     0057  5300 					; case of an error in routine

                                     0057  5400 					; If an error, convert signal to user PC

                                     0057  5500 					; and resignal

            56         04 BC     70  0057  5600 	MOVD	@value(AP), R6		; R6/R7 = |X| = @value(AP)

            50            56     70  005B  5700 	MOVD	R6, R0

            50       8000 8F     AA  005E  5800 	BICW2	#^X8000, R0		; R0/R1 = |X|

       3F80 8F            50     B1  0063  5900 	CMPW	R0, #^X3F80		; compare |X| with 0.25

                          1A     18  0068  6000 	BGEQ	GEQ_TO_0.25		; branch if |X| >= 0.25

                                     006A  6100 

                                     006A  6200 ;

                                     006A  6300 ; |X| < 0.25

                                     006A  6400 ;

                                     006A  6500 

       3300 8F            50     B1  006A  6600 	CMPW	R0, #^X3300		; compare |X| with 2**-27

                          04     18  006F  6700 	BGEQ	GEQ_TO_2M27		; branch if |X| >= 2**-27

                                     0071  6800 

                                     0071  6900 ;

                                     0071  7000 ; |X| < 2**-27

                                     0071  7100 ;

                                     0071  7200 

            50            56     70  0071  7300 	MOVD	R6, R0		; R0/R1 = X

                                 04  0074  7400 	RET				; return with result = argument

                                     0075  7500 

                                     0075  7600 ;

                                     0075  7700 ; 2**-27 =< |X| < 0.25

                                     0075  7800 ;

                                     0075  7900 

                                     0075  8000 GEQ_TO_2M27:

            50            50     64  0075  8100 	MULD	R0,R0			;Get ARG**2 for POLYD

            05            50     75  0078  8200 	POLYD	R0, #DSINHLEN-1, DSINHTAB

                       A3 AF         007B       

                                     007D  8300 					; R0/R1 = SUM(Ci*X**i), with

                                     007D  8400 					;  last coefficient zero

            50            56     64  007D  8500 	MULD	R6,R0			;MULD by ARG, and then

            50            56     60  0080  8600 	ADDD	R6,R0			;  add in ARG with overhang.

                                 04  0083  8700 	RET				; return with result in R0/R1

                                     0084  8800 

                                     0084  8900 ;

                                     0084  9000 ; 0.25 =< |X|

                                     0084  9100 ;

                                     0084  9200 

                                     0084  9300 GEQ_TO_0.25:

         80 AF            50     71  0084  9400 	CMPD	R0, D_87.0		; compare |X| with 87.0

                          1E     14  0088  9500 	BGTR	GTR_THAN_87.0		; branch if |X| > 87.0

                                     008A  9600 

                                     008A  9700 ;

                                     008A  9800 ; 0.25 =< |X| =< 87.0

                                     008A  9900 ;

                                     008A 10000 

            50            56     70  008A 10100 	MOVD	R6, R0		; R0/R1 = X

                 00000000'EF     16  008D 10200 	JSB	MTH$DEXP_R7		; R0/R1 = DEXP(X)

            7E            50     7D  0093 10300 	MOVQ	R0, -(SP)		; push DEXP(X) on stack

            50         04 BC     72  0096 10400 	MNEGD	@value(AP), R0		; R0/R1 = -X

                 00000000'EF     16  009A 10500 	JSB	MTH$DEXP_R7		; R0/R1 = DEXP(-X)

            8E            50     63  00A0 10600 	SUBD3	R0, (SP)+, R0		; R0/R1 = DEXP(X) - DEXP(-X)

                          50         00A3       

            50            00     64  00A4 10700 	MULD	S^#SD_0.5, R0		; R0/R1 = (DEXP(X) - DEXP(-X))/2

MTH$DSINH       ; Double Floating Hyperbolic Sine routine        21-AUG-1978 19:05:10   VAX-11 MACRO X0.3-11               Page   7

0-4             MTH$DSINH  - Standard Double Precision Floating                                                                  (4)



                                 04  00A7 10800 	RET				; return with result in R0/R1

                                     00A8 10900 

                                     00A8 11000 ;

                                     00A8 11100 ; 87.0 < |X|

                                     00A8 11200 ;

                                     00A8 11300 

                                     00A8 11400 GTR_THAN_87.0:

            50       FF6C CF     62  00A8 11500 	SUBD	D_LOG_2, R0		; R0/R1 = |X| - LOG(2)

       FF56 CF            50     71  00AD 11600 	CMPD	R0, D_87.0		; compare |X| - LOG(2) with 87.0

                          0F     18  00B2 11700 	BGEQ	ERROR			; branch to ERROR if |X| - LOG(2) >= 87.0

                                     00B4 11800 

                                     00B4 11900 

                                     00B4 12000 ;

                                     00B4 12100 ; 87.0 < |X| < 87.0 + LOG(2)

                                     00B4 12200 ;

                                     00B4 12300 

                 00000000'EF     16  00B4 12400 	JSB	MTH$DEXP_R7		; R0/R1 = DEXP(|X|-LOG(2))

                       04 BC     73  00BA 12500 	TSTD	@value(AP)		; test the sign of X

                          03     18  00BD 12600 	BGEQ	10$			; branch if X >= 0

            50            50     72  00BF 12700 	MNEGD	R0, R0			; R0/R1 = sign(X) * DEXP(|X|-LOG(2))

                                 04  00C2 12800 10$:	RET				; return with result in R0/R1

                                     00C3 12900 

                                     00C3 13000 ;

                                     00C3 13100 ; 87.0 + LOG(2) =< |X|, error

                                     00C3 13200 ;

                                     00C3 13300 

            7E         58 8F     9A  00C3 13400 ERROR:	MOVZBL	#MTH__FLOOVEMAT, -(SP)	; condition value

            01            0F     79  00C7 13500 	ASHQ	#15, #1, R0		; R0/R1 = result = reserved operand -0.0

                          50         00CA       

                                     00CB 13600 					; goes to signal mechanism vector

                                     00CB 13700 					; (CHF$L_MCH_R0/R1) so error handler

                                     00CB 13800 					; can modify the result.

       0000'CF            01     FB  00CB 13900 	CALLS	#1, W^MTH$$SIGNAL	; signal error and use real user's PC

                                     00D0 14000 					; independent of CALL vs JSB

                                 04  00D0 14100 	RET				; return - R0/R1 restored from CHF$L_MCH_R0/R1

                                     00D1 14200 

                                     00D1 14300 

                                     00D1 14400 

                                     00D1 14500 	.END

MTH$DSINH       ; Double Floating Hyperbolic Sine routine        21-AUG-1978 19:05:10   VAX-11 MACRO X0.3-11               Page   8

SYMBOL TABLE                                                                                                                     (4)



DSINHLEN       = 00000006            

DSINHTAB         00000020 R     03   

D_0.25           00000000 R     03   

D_2_POWER_M27    00000010 R     03   

D_87.0           00000008 R     03   

D_LOG_2          00000018 R     03   

ERROR            000000C3 R     03   

FOR$K_ERR_PREFX= 00000018            

GBL...         = 00000000            

GEQ_TO_0.25      00000084 R     03   

GEQ_TO_2M27      00000075 R     03   

GTR_THAN_87.0    000000A8 R     03   

LONG           = 00000004            

MTH$$JACKET_HND  ********   X   03   

MTH$$SIGNAL      ********   X   03   

MTH$DEXP_R7      ********   X   03   

MTH$DSINH        00000050 RG    03   

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            

SD_0.5         = 00004000            

SD_1.0         = 00004080            

SRM$K_DEC_OVF_T= 00000006            

SRM$K_FLT_DIV_T= 00000004            

SRM$K_FLT_OVF_T= 00000003            

SRM$K_FLT_UND_T= 00000005            

SRM$K_INT_DIV_T= 00000002            

SRM$K_INT_OVF_T= 00000001            

SRM$K_SUB_RNG_T= 00000007            

VALUE          = 00000004            

X              = 00000004            





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  

$ABS$            00000000      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

MTH$CODE         000000D1      03       PIC   USR   CON   REL   LCL   SHR   EXE   RD  NOWRT LONG  





THERE WERE NO ERRORS OR WARNINGS.

26912. BYTES LEFT IN FREE MEMORY POOL.

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

5 MLB DIR RDS - 38 GETS TO DEFINE 5 MACROS. 4 INTER. FILE WRITES. 

