1 | XLFMTH1 ;SF-ISC - CONT. OF MATH FUNCTIONS;07/16/93 10:21
|
---|
2 | ;;8.0;KERNEL;;Jul 10, 1995
|
---|
3 | ;these tags cannot be called directly. Must use tags in XLFMTH.
|
---|
4 | ASIND ;
|
---|
5 | 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
|
---|
6 | ASIN ;
|
---|
7 | N L,M,N,O,P,Y,LIM,SIGN,SIG,SIGS,SIGT,FOLD S PR=$$PR($G(PR),10) D AS G Q
|
---|
8 | 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)
|
---|
9 | Q
|
---|
10 | 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
|
---|
11 | AS2 S Y=3.14159265358979/2*X Q
|
---|
12 | ACOSD ;
|
---|
13 | 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
|
---|
14 | ACOS ;
|
---|
15 | N L,M,N,O,P,Y,LIM,SIG,SIGN,SIGS,SIGT,FOLD S PR=$$PR($G(PR),10) D AC G Q
|
---|
16 | 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
|
---|
17 | AC1 S Y=0 Q
|
---|
18 | ATAND ;
|
---|
19 | 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
|
---|
20 | ATAN ;
|
---|
21 | N L,M,N,O,P,Y,LIM,SIGN,SIGS,SIG,SIGT,FOLD S PR=$$PR($G(PR),10) D AT G Q
|
---|
22 | 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
|
---|
23 | 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)
|
---|
24 | S Y=$S(FOLD:3.14159265358979/2-Y,1:Y),Y=$S(SIGT<1:-Y,1:Y) Q
|
---|
25 | 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
|
---|
26 | ACOTD ;
|
---|
27 | 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)
|
---|
28 | ACOT ;
|
---|
29 | 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)
|
---|
30 | ASECD ;
|
---|
31 | 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)
|
---|
32 | ASEC ;
|
---|
33 | 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)
|
---|
34 | ACSCD ;
|
---|
35 | 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)
|
---|
36 | ACSC ;
|
---|
37 | 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)
|
---|
38 | ;
|
---|
39 | PR(PR,PL) Q $S('$L(PR):PL,PR>PL:PL,1:PR)
|
---|
40 | Q Q +$J(Y,0,$S((PR-$L(Y\1))'<0:PR-$L(Y\1),1:0))
|
---|