XLFMTH1 ;SF-ISC - CONT. OF MATH FUNCTIONS;07/16/93 10:21
;;8.0;KERNEL;;Jul 10, 1995
;these tags cannot be called directly. Must use tags in XLFMTH.
ASIND ;
N L,M,N,O,P,Y,LIM,SIGN,SIGS,SIGT,FOLD S PR=$$PR($G(PR),10) D AS S Y=$$RTD^XLFMTH(Y,PR) G Q
ASIN ;
N L,M,N,O,P,Y,LIM,SIGN,SIG,SIGS,SIGT,FOLD S PR=$$PR($G(PR),10) D AS G Q
AS G:$TR(X,"-")=1 AS2 G:X>.9 AS1 S (Y,L)=X D LIM^XLFMTH F O=3:2 S L=L*X*X*(O-2)/(O-1)*(O-2)/O,Y=Y+L Q:($TR(L,"-")<LIM)
Q
AS1 S SIGS=$S(X<0:-1,1:1) S Y=1/(1/X/X-1),X=.5 S X=$$PWR^XLFMTH(Y,X) D AT S Y=Y*SIGS Q
AS2 S Y=3.14159265358979/2*X Q
ACOSD ;
N L,M,N,O,P,Y,LIM,SIGN,SIG,SIGS,SIGT,FOLD S PR=$$PR($G(PR),10) D AC S Y=$$RTD^XLFMTH(Y,PR) G Q
ACOS ;
N L,M,N,O,P,Y,LIM,SIG,SIGN,SIGS,SIGT,FOLD S PR=$$PR($G(PR),10) D AC G Q
AC G:$TR(X,"-")=1 AC1 S SIG=$S(X<0:-1,1:1),Y=1-(X*X),X=.5 S X=$$PWR^XLFMTH(Y,X) D AS S Y=$S(SIG<0:3.14159265358979-Y,1:Y) Q
AC1 S Y=0 Q
ATAND ;
N L,M,N,O,P,Y,LIM,SIGN,SIG,SIGS,SIGT,FOLD S PR=$$PR($G(PR),10) D AT S Y=$$RTD^XLFMTH(Y,PR) G Q
ATAN ;
N L,M,N,O,P,Y,LIM,SIGN,SIGS,SIG,SIGT,FOLD S PR=$$PR($G(PR),10) D AT G Q
AT S SIGT=$S(X<0:-1,1:1),X=$TR(X,"-"),X=$S(X<.0000000001:.0000000001,X>9999999999:9999999999,1:X),FOLD=$S(X'<1:0,1:1),X=$S(FOLD:1/X,1:X),L=X,Y=3.14159265358979/2-(1/X),SIGN=1 G:X<1.3 AT1
D LIM^XLFMTH F O=3:2 S L=L*X*X,Y=Y+(1/(O*L)*SIGN),SIGN=SIGN*-1 Q:($TR(1/L,"-")<LIM)
S Y=$S(FOLD:3.14159265358979/2-Y,1:Y),Y=$S(SIGT<1:-Y,1:Y) Q
AT1 S X=$S(FOLD:1/X,1:X),Y=1/((1/X/X)+1),X=.5,X=$$PWR^XLFMTH(Y,X) D AS S Y=$S(SIGT<1:-Y,1:Y) Q
ACOTD ;
N L,M,N,O,P,Y,LIM,SIGN,SIGS,SIG,SIGT,FOLD S PR=$$PR($G(PR),10),X=1/X Q $$ATANDEG^XLFMTH(X,PR)
ACOT ;
N L,M,N,O,P,Y,LIM,SIGN,SIGS,SIG,SIGT,FOLD S PR=$$PR($G(PR),10),X=1/X Q $$ATAN^XLFMTH(X,PR)
ASECD ;
N L,M,N,O,P,Y,LIM,SIGN,SIGS,SIG,SIGT,FOLD S PR=$$PR($G(PR),10),X=1/X Q $$ACOSDEG^XLFMTH(X,PR)
ASEC ;
N L,M,N,O,P,Y,LIM,SIGN,SIGS,SIG,SIGT,FOLD S PR=$$PR($G(PR),10),X=1/X Q $$ACOS^XLFMTH(X,PR)
ACSCD ;
N L,M,N,O,P,Y,LIM,SIGN,SIGS,SIG,SIGT,FOLD S PR=$$PR($G(PR),10),X=1/X Q $$ASINDEG^XLFMTH(X,PR)
ACSC ;
N L,M,N,O,P,Y,LIM,SIGN,SIGS,SIG,SIGT,FOLD S PR=$$PR($G(PR),10),X=1/X Q $$ASIN^XLFMTH(X,PR)
;
PR(PR,PL) Q $S('$L(PR):PL,PR>PL:PL,1:PR)
Q Q +$J(Y,0,$S((PR-$L(Y\1))'<0:PR-$L(Y\1),1:0))
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXLFMTH1 2241 printed Nov 22, 2024@17:13:01 Page 2
XLFMTH1 ;SF-ISC - CONT. OF MATH FUNCTIONS;07/16/93 10:21
+1 ;;8.0;KERNEL;;Jul 10, 1995
+2 ;these tags cannot be called directly. Must use tags in XLFMTH.
ASIND ;
+1 NEW L,M,N,O,P,Y,LIM,SIGN,SIGS,SIGT,FOLD
SET PR=$$PR($GET(PR),10)
DO AS
SET Y=$$RTD^XLFMTH(Y,PR)
GOTO Q
ASIN ;
+1 NEW L,M,N,O,P,Y,LIM,SIGN,SIG,SIGS,SIGT,FOLD
SET PR=$$PR($GET(PR),10)
DO AS
GOTO Q
AS if $TRANSLATE(X,"-")=1
GOTO AS2
if X>.9
GOTO AS1
SET (Y,L)=X
DO LIM^XLFMTH
FOR O=3:2
SET L=L*X*X*(O-2)/(O-1)*(O-2)/O
SET Y=Y+L
if ($TRANSLATE(L,"-")<LIM)
QUIT
+1 QUIT
AS1 SET SIGS=$SELECT(X<0:-1,1:1)
SET Y=1/(1/X/X-1)
SET X=.5
SET X=$$PWR^XLFMTH(Y,X)
DO AT
SET Y=Y*SIGS
QUIT
AS2 SET Y=3.14159265358979/2*X
QUIT
ACOSD ;
+1 NEW L,M,N,O,P,Y,LIM,SIGN,SIG,SIGS,SIGT,FOLD
SET PR=$$PR($GET(PR),10)
DO AC
SET Y=$$RTD^XLFMTH(Y,PR)
GOTO Q
ACOS ;
+1 NEW L,M,N,O,P,Y,LIM,SIG,SIGN,SIGS,SIGT,FOLD
SET PR=$$PR($GET(PR),10)
DO AC
GOTO Q
AC if $TRANSLATE(X,"-")=1
GOTO AC1
SET SIG=$SELECT(X<0:-1,1:1)
SET Y=1-(X*X)
SET X=.5
SET X=$$PWR^XLFMTH(Y,X)
DO AS
SET Y=$SELECT(SIG<0:3.14159265358979-Y,1:Y)
QUIT
AC1 SET Y=0
QUIT
ATAND ;
+1 NEW L,M,N,O,P,Y,LIM,SIGN,SIG,SIGS,SIGT,FOLD
SET PR=$$PR($GET(PR),10)
DO AT
SET Y=$$RTD^XLFMTH(Y,PR)
GOTO Q
ATAN ;
+1 NEW L,M,N,O,P,Y,LIM,SIGN,SIGS,SIG,SIGT,FOLD
SET PR=$$PR($GET(PR),10)
DO AT
GOTO Q
AT SET SIGT=$SELECT(X<0:-1,1:1)
SET X=$TRANSLATE(X,"-")
SET X=$SELECT(X<.0000000001:.0000000001,X>9999999999:9999999999,1:X)
SET FOLD=$SELECT(X'<1:0,1:1)
SET X=$SELECT(FOLD:1/X,1:X)
SET L=X
SET Y=3.14159265358979/2-(1/X)
SET SIGN=1
if X<1.3
GOTO AT1
+1 DO LIM^XLFMTH
FOR O=3:2
SET L=L*X*X
SET Y=Y+(1/(O*L)*SIGN)
SET SIGN=SIGN*-1
if ($TRANSLATE(1/L,"-")<LIM)
QUIT
+2 SET Y=$SELECT(FOLD:3.14159265358979/2-Y,1:Y)
SET Y=$SELECT(SIGT<1:-Y,1:Y)
QUIT
AT1 SET X=$SELECT(FOLD:1/X,1:X)
SET Y=1/((1/X/X)+1)
SET X=.5
SET X=$$PWR^XLFMTH(Y,X)
DO AS
SET Y=$SELECT(SIGT<1:-Y,1:Y)
QUIT
ACOTD ;
+1 NEW L,M,N,O,P,Y,LIM,SIGN,SIGS,SIG,SIGT,FOLD
SET PR=$$PR($GET(PR),10)
SET X=1/X
QUIT $$ATANDEG^XLFMTH(X,PR)
ACOT ;
+1 NEW L,M,N,O,P,Y,LIM,SIGN,SIGS,SIG,SIGT,FOLD
SET PR=$$PR($GET(PR),10)
SET X=1/X
QUIT $$ATAN^XLFMTH(X,PR)
ASECD ;
+1 NEW L,M,N,O,P,Y,LIM,SIGN,SIGS,SIG,SIGT,FOLD
SET PR=$$PR($GET(PR),10)
SET X=1/X
QUIT $$ACOSDEG^XLFMTH(X,PR)
ASEC ;
+1 NEW L,M,N,O,P,Y,LIM,SIGN,SIGS,SIG,SIGT,FOLD
SET PR=$$PR($GET(PR),10)
SET X=1/X
QUIT $$ACOS^XLFMTH(X,PR)
ACSCD ;
+1 NEW L,M,N,O,P,Y,LIM,SIGN,SIGS,SIG,SIGT,FOLD
SET PR=$$PR($GET(PR),10)
SET X=1/X
QUIT $$ASINDEG^XLFMTH(X,PR)
ACSC ;
+1 NEW L,M,N,O,P,Y,LIM,SIGN,SIGS,SIG,SIGT,FOLD
SET PR=$$PR($GET(PR),10)
SET X=1/X
QUIT $$ASIN^XLFMTH(X,PR)
+2 ;
PR(PR,PL) QUIT $SELECT('$LENGTH(PR):PL,PR>PL:PL,1:PR)
Q QUIT +$JUSTIFY(Y,0,$SELECT((PR-$LENGTH(Y\1))'<0:PR-$LENGTH(Y\1),1:0))