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


56.3
date     93.01.27.13.56.49;  author jwh;  state Exp;
branches ;
next     56.2;

56.2
date     93.01.27.12.28.27;  author jwh;  state Exp;
branches ;
next     56.1;

56.1
date     91.11.07.12.29.44;  author jwh;  state Exp;
branches ;
next     1.1;

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


desc
@@


56.3
log
@
pws2rcs automatic delta on Wed Jan 27 13:14:25 MST 1993
@
text
@*
*       sasin.sa 3.1 12/10/90
*
*       Description: The entry point sAsin computes the inverse sine of
*               an input argument; sAsind does the same except for denormalized
*               input.
*
*       Input: Double-extended number X in location pointed to
*               by address register a0.
*
*       Output: The value arcsin(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 sASIN takes approximately 310 cycles.
*
*       Algorithm:
*
*       ASIN
*       1. If |X| >= 1, go to 3.
*
*       2. (|X| < 1) Calculate asin(X) by
*               z := sqrt( [1-X][1+X] )
*               asin(X) = atan( x / z ).
*               Exit.
*
*       3. If |X| > 1, go to 5.
*
*       4. (|X| = 1) sgn := sign(X), return asin(X) := sgn * Pi/2. Exit.
*
*       5. (|X| > 1) Generate an invalid operation by 0 * infinity.
*               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.


* added to replace single-precision floating point immediates :
V3F800000   DC.L   $3F800000

PIBY2   DC.L $3FFF0000,$C90FDAA2,$2168C235,$00000000

	refr    t_operr
	refr    t_frcinx
	refr    t_extdnrm
	refr    satan

	def     sasind
sasind    equ    *
*--ASIN(X) = X FOR DENORMALIZED X

	bra             t_extdnrm

	def     sasin
sasin    equ    *
	FMOVE.X         (a0),FP0        ...LOAD INPUT

	move.l          (a0),d0
	move.w          4(a0),d0
	ANDI.L          #$7FFFFFFF,D0
	CMPI.L          #$3FFF8000,D0
	BGE.B           asinbig

*--THIS IS THE USUAL CASE, |X| < 1
*--ASIN(X) = ATAN( X / SQRT( (1-X)(1+X) ) )

*       FMOVE.S         #:3F800000,FP1
	FMOVE.S         V3F800000,FP1
	FSUB.X          FP0,FP1         ...1-X
	fmovem.x        fp2,-(a7)
*       FMOVE.S         #:3F800000,FP2
	FMOVE.S         V3F800000,FP2
	FADD.X          FP0,FP2         ...1+X
	FMUL.X          FP2,FP1         ...(1+X)(1-X)
	fmovem.x        (a7)+,fp2
	FSQRT.X         FP1             ...SQRT([1-X][1+X])
	FDIV.X          FP1,FP0         ...X/SQRT([1-X][1+X])
	fmovem.x        fp0,(a0)
	bsr             satan
	bra             t_frcinx

asinbig    equ    *
	FABS.X          FP0      ...|X|
*       FCMP.S          #:3F800000,FP0
	FCMP.S          V3F800000,FP0
	fbgt            t_operr         ;cause an operr exception

*--|X| = 1, ASIN(X) = +- PI/2.

	FMOVE.X         PIBY2,FP0
	move.l          (a0),d0
	ANDI.L          #$80000000,D0   ...SIGN BIT OF X
	ORI.L           #$3F800000,D0   ...+-1 IN SGL FORMAT
	MOVE.L          D0,-(sp)        ...push SIGN(X) IN SGL-FMT
	FMOVE.L         d1,FPCONTROL
	FMUL.S          (sp)+,FP0
	bra             t_frcinx

	end
@


56.2
log
@
pws2rcs automatic delta on Wed Jan 27 11:57:27 MST 1993
@
text
@d1 107
@


56.1
log
@Automatic bump of revision number for PWS version 3.25
@
text
@a0 107
*
*       sasin.sa 3.1 12/10/90
*
*       Description: The entry point sAsin computes the inverse sine of
*               an input argument; sAsind does the same except for denormalized
*               input.
*
*       Input: Double-extended number X in location pointed to
*               by address register a0.
*
*       Output: The value arcsin(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 sASIN takes approximately 310 cycles.
*
*       Algorithm:
*
*       ASIN
*       1. If |X| >= 1, go to 3.
*
*       2. (|X| < 1) Calculate asin(X) by
*               z := sqrt( [1-X][1+X] )
*               asin(X) = atan( x / z ).
*               Exit.
*
*       3. If |X| > 1, go to 5.
*
*       4. (|X| = 1) sgn := sign(X), return asin(X) := sgn * Pi/2. Exit.
*
*       5. (|X| > 1) Generate an invalid operation by 0 * infinity.
*               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.


* added to replace single-precision floating point immediates :
V3F800000   DC.L   $3F800000

PIBY2   DC.L $3FFF0000,$C90FDAA2,$2168C235,$00000000

	refr    t_operr
	refr    t_frcinx
	refr    t_extdnrm
	refr    satan

	def     sasind
sasind    equ    *
*--ASIN(X) = X FOR DENORMALIZED X

	bra             t_extdnrm

	def     sasin
sasin    equ    *
	FMOVE.X         (a0),FP0        ...LOAD INPUT

	move.l          (a0),d0
	move.w          4(a0),d0
	ANDI.L          #$7FFFFFFF,D0
	CMPI.L          #$3FFF8000,D0
	BGE.B           asinbig

*--THIS IS THE USUAL CASE, |X| < 1
*--ASIN(X) = ATAN( X / SQRT( (1-X)(1+X) ) )

*       FMOVE.S         #:3F800000,FP1
	FMOVE.S         V3F800000,FP1
	FSUB.X          FP0,FP1         ...1-X
	fmovem.x        fp2,-(a7)
*       FMOVE.S         #:3F800000,FP2
	FMOVE.S         V3F800000,FP2
	FADD.X          FP0,FP2         ...1+X
	FMUL.X          FP2,FP1         ...(1+X)(1-X)
	fmovem.x        (a7)+,fp2
	FSQRT.X         FP1             ...SQRT([1-X][1+X])
	FDIV.X          FP1,FP0         ...X/SQRT([1-X][1+X])
	fmovem.x        fp0,(a0)
	bsr             satan
	bra             t_frcinx

asinbig    equ    *
	FABS.X          FP0      ...|X|
*       FCMP.S          #:3F800000,FP0
	FCMP.S          V3F800000,FP0
	fbgt            t_operr         ;cause an operr exception

*--|X| = 1, ASIN(X) = +- PI/2.

	FMOVE.X         PIBY2,FP0
	move.l          (a0),d0
	ANDI.L          #$80000000,D0   ...SIGN BIT OF X
	ORI.L           #$3F800000,D0   ...+-1 IN SGL FORMAT
	MOVE.L          D0,-(sp)        ...push SIGN(X) IN SGL-FMT
	FMOVE.L         d1,FPCONTROL
	FMUL.S          (sp)+,FP0
	bra             t_frcinx

	end
@


1.1
log
@Initial revision
@
text
@@
