head     56.1;
access   ;
symbols  ;
locks    ; strict;
comment  @# @;


56.1
date     91.11.05.09.34.13;  author jwh;  state Exp;
branches ;
next     55.1;

55.1
date     91.08.25.10.12.35;  author jwh;  state Exp;
branches ;
next     54.2;

54.2
date     91.08.21.14.39.57;  author jwh;  state Exp;
branches ;
next     54.1;

54.1
date     91.03.18.15.19.35;  author jwh;  state Exp;
branches ;
next     53.1;

53.1
date     91.03.11.19.20.55;  author jwh;  state Exp;
branches ;
next     52.1;

52.1
date     91.02.19.09.05.03;  author jwh;  state Exp;
branches ;
next     51.1;

51.1
date     91.01.30.16.04.17;  author jwh;  state Exp;
branches ;
next     1.2;

1.2
date     91.01.30.10.24.13;  author jwh;  state Exp;
branches ;
next     1.1;

1.1
date     91.01.16.15.58.52;  author jwh;  state Exp;
branches ;
next     ;


desc
@first version.

@


56.1
log
@Automatic bump of revision number for PWS version 3.25
@
text
@@


55.1
log
@Automatic bump of revision number for PWS version 3.25A
@
text
@@


54.2
log
@
pws2rcs automatic delta on Wed Aug 21 13:42:03 MDT 1991
@
text
@@


54.1
log
@Automatic bump of revision number for PWS version 3.24
@
text
@a0 139
*
*       ssinh.sa 3.1 12/10/90
*
*       The entry point sSinh computes the hyperbolic sine of
*       an input argument; sSinhd does the same except for denormalized
*       input.
*
*       Input: Double-extended number X in location pointed to
*               by address register a0.
*
*       Output: The value sinh(X) returned in floating-point register Fp0.
*
*       Accuracy and Monotonicity: The returned result is within 3 ulps in
*               64 significant bit, i.e. within 0.5001 ulp to 53 bits if the
*               result is subsequently rounded to double precision. The
*               result is provably monotonic in double precision.
*
*       Speed: The program sSINH takes approximately 280 cycles.
*
*       Algorithm:
*
*       SINH
*       1. If |X| > 16380 log2, go to 3.
*
*       2. (|X| <= 16380 log2) Sinh(X) is obtained by the formulae
*               y = |X|, sgn = sign(X), and z = expm1(Y),
*               sinh(X) = sgn*(1/2)*( z + z/(1+z) ).
*          Exit.
*
*       3. If |X| > 16480 log2, go to 5.
*
*       4. (16380 log2 < |X| <= 16480 log2)
*               sinh(X) = sign(X) * exp(|X|)/2.
*          However, invoking exp(|X|) may cause premature overflow.
*          Thus, we calculate sinh(X) as follows:
*             Y       := |X|
*             sgn     := sign(X)
*             sgnFact := sgn * 2**(16380)
*             Y'      := Y - 16381 log2
*             sinh(X) := sgnFact * exp(Y').
*          Exit.
*
*       5. (|X| > 16480 log2) sinh(X) must overflow. Return
*          sign(X)*Huge*Huge to generate overflow and an infinity with
*          the appropriate sign. Huge is the largest finite number in
*          extended format. Exit.
*

*               Copyright (C) Motorola, Inc. 1990
*                       All Rights Reserved
*
*       THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
*       The copyright notice above does not evidence any
*       actual or intended publication of such source code.



T1      DC.L $40C62D38,$D3D64634 ... 16381 LOG2 LEAD
T2      DC.L $3D6F90AE,$B1E75CC7 ... 16381 LOG2 TRAIL

* added to replace single precision immediate :
V3F800000  DC.L  $3F800000

	refr    t_frcinx
	refr    t_ovfl
	refr    t_extdnrm
	refr    setox
	refr    setoxm1

	def     ssinhd
ssinhd    equ    *
*--SINH(X) = X FOR DENORMALIZED X

	bra     t_extdnrm

	def     ssinh
ssinh    equ    *
	FMOVE.x (a0),FP0        ...LOAD INPUT

	move.l  (a0),d0
	move.w  4(a0),d0
	move.l  d0,a1           save a copy of original (compacted) operand
	AND.L   #$7FFFFFFF,D0
	CMP.L   #$400CB167,D0
	BGT.B   SINHBIG

*--THIS IS THE USUAL CASE, |X| < 16380 LOG2
*--Y = |X|, Z = EXPM1(Y), SINH(X) = SIGN(X)*(1/2)*( Z + Z/(1+Z) )

	FABS.X  FP0             ...Y = |X|

	movem.l a1/d1,-(sp)
	fmovem.x fp0,(a0)
	clr.l   d1
	bsr     setoxm1         ...FP0 IS Z = EXPM1(Y)
	fmove.l #0,FPCONTROL
	movem.l (sp)+,a1/d1

	FMOVE.X FP0,FP1
*       FADD.S  #:3F800000,FP1  ...1+Z
	FADD.s  V3F800000,FP1   ...1+Z
	FMOVE.X FP0,-(sp)
	FDIV.X  FP1,FP0         ...Z/(1+Z)
	MOVE.L  a1,d0
	AND.L   #$80000000,D0
	OR.L    #$3F000000,D0
	FADD.X  (sp)+,FP0
	MOVE.L  D0,-(sp)

	fmove.l d1,FPCONTROL
	fmul.s  (sp)+,fp0       ;last fp inst - possible exceptions set

	bra     t_frcinx

SINHBIG    equ    *
	cmp.l   #$400CB2B3,D0
	bgt     t_ovfl
	FABS.X  FP0
*       FSUB.D  T1(pc),FP0      ...(|X|-16381LOG2_LEAD)
	FSUB.D  T1,FP0  ...(|X|-16381LOG2_LEAD)
	move.l  #0,-(sp)
	move.l  #$80000000,-(sp)
	move.l  a1,d0
	AND.L   #$80000000,D0
	OR.L    #$7FFB0000,D0
	MOVE.L  D0,-(sp)        ...EXTENDED FMT
*       FSUB.D  T2(pc),FP0      ...|X| - 16381 LOG2, ACCURATE
	FSUB.D  T2,FP0  ...|X| - 16381 LOG2, ACCURATE

	move.l  d1,-(sp)
	clr.l   d1
	fmovem.x fp0,(a0)
	bsr     setox
	fmove.l (sp)+,FPCONTROL

	fmul.x  (sp)+,fp0       ;possible exception
	bra     t_frcinx

	end
@


53.1
log
@Automatic bump of revision number for PWS version 3.24B
@
text
@@


52.1
log
@Automatic bump of revision number for PWS version 3.24A
@
text
@@


51.1
log
@Automatic bump of revision number for PWS version 3.24d
@
text
@@


1.2
log
@
pws2rcs automatic delta on Wed Jan 30 09:08:19 MST 1991
@
text
@@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
*	ssinh.sa 3.1 12/10/90
d8 2
a9 2
*       Input: Double-extended number X in location pointed to 
*		by address register a0.
d49 2
a50 2
*		Copyright (C) Motorola, Inc. 1990
*			All Rights Reserved
d52 3
a54 3
*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA 
*	The copyright notice above does not evidence any  
*	actual or intended publication of such source code.
d58 2
a59 2
T1	DC.L $40C62D38,$D3D64634 ... 16381 LOG2 LEAD
T2	DC.L $3D6F90AE,$B1E75CC7 ... 16381 LOG2 TRAIL
d64 5
a68 5
	refr	t_frcinx
	refr	t_ovfl
	refr	t_extdnrm
	refr	setox
	refr	setoxm1
d70 1
a70 1
	def	ssinhd
d74 1
a74 1
	bra	t_extdnrm
d76 1
a76 1
	def	ssinh
d78 1
a78 1
	FMOVE.x	(a0),FP0	...LOAD INPUT
d80 6
a85 6
	move.l	(a0),d0
	move.w	4(a0),d0
	move.l	d0,a1		save a copy of original (compacted) operand
	AND.L	#$7FFFFFFF,D0
	CMP.L	#$400CB167,D0
	BGT.B	SINHBIG
d90 1
a90 1
	FABS.X	FP0		...Y = |X|
d92 1
a92 1
	movem.l	a1/d1,-(sp)
d94 4
a97 4
	clr.l	d1
	bsr	setoxm1	 	...FP0 IS Z = EXPM1(Y)
	fmove.l	#0,FPCONTROL
	movem.l	(sp)+,a1/d1
d99 10
a108 10
	FMOVE.X	FP0,FP1
*       FADD.S	#:3F800000,FP1	...1+Z
        FADD.s	V3F800000,FP1	...1+Z
	FMOVE.X	FP0,-(sp)
	FDIV.X	FP1,FP0		...Z/(1+Z)
	MOVE.L	a1,d0
	AND.L	#$80000000,D0
	OR.L	#$3F000000,D0
	FADD.X	(sp)+,FP0
	MOVE.L	D0,-(sp)
d110 2
a111 2
	fmove.l	d1,FPCONTROL
	fmul.s	(sp)+,fp0	;last fp inst - possible exceptions set
d113 1
a113 1
	bra	t_frcinx
d116 13
a128 13
	cmp.l	#$400CB2B3,D0
	bgt	t_ovfl
	FABS.X	FP0
*       FSUB.D	T1(pc),FP0	...(|X|-16381LOG2_LEAD)
        FSUB.D	T1,FP0	...(|X|-16381LOG2_LEAD)
	move.l	#0,-(sp)
	move.l	#$80000000,-(sp)
	move.l	a1,d0
	AND.L	#$80000000,D0
	OR.L	#$7FFB0000,D0
	MOVE.L	D0,-(sp)	...EXTENDED FMT
*       FSUB.D	T2(pc),FP0	...|X| - 16381 LOG2, ACCURATE
        FSUB.D	T2,FP0	...|X| - 16381 LOG2, ACCURATE
d130 2
a131 2
	move.l	d1,-(sp)
	clr.l	d1
d133 2
a134 2
	bsr	setox
	fmove.l	(sp)+,FPCONTROL
d136 2
a137 2
	fmul.x	(sp)+,fp0	;possible exception
	bra	t_frcinx
@
