source: FOIAVistA/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XLFMTH1.m@ 876

Last change on this file since 876 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1XLFMTH1 ;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.
4ASIND ;
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
6ASIN ;
7 N L,M,N,O,P,Y,LIM,SIGN,SIG,SIGS,SIGT,FOLD S PR=$$PR($G(PR),10) D AS G Q
8AS 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
10AS1 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
11AS2 S Y=3.14159265358979/2*X Q
12ACOSD ;
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
14ACOS ;
15 N L,M,N,O,P,Y,LIM,SIG,SIGN,SIGS,SIGT,FOLD S PR=$$PR($G(PR),10) D AC G Q
16AC 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
17AC1 S Y=0 Q
18ATAND ;
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
20ATAN ;
21 N L,M,N,O,P,Y,LIM,SIGN,SIGS,SIG,SIGT,FOLD S PR=$$PR($G(PR),10) D AT G Q
22AT 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
25AT1 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
26ACOTD ;
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)
28ACOT ;
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)
30ASECD ;
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)
32ASEC ;
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)
34ACSCD ;
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)
36ACSC ;
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 ;
39PR(PR,PL) Q $S('$L(PR):PL,PR>PL:PL,1:PR)
40Q Q +$J(Y,0,$S((PR-$L(Y\1))'<0:PR-$L(Y\1),1:0))
Note: See TracBrowser for help on using the repository browser.