home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacker Chronicles 2
/
HACKER2.BIN
/
119.LAC.BAS
< prev
next >
Wrap
BASIC Source File
|
1986-03-27
|
14KB
|
612 lines
395 CLS:BEEP:INPUT"START DATE OF LOOKANGLES (YYDOY)";DA
396 PRINT:INPUT"STOP DATE OF LOOKANGLES (YYDOY)";DA1:IF DA>DA1 THEN BEEP:GOTO 395
397 PRINT:INPUT"TIME BETWEEN LOOK POINTS DESIRED (SECONDS)";DT:DT1=DT
398 PRINT:INPUT"RANGE IN KILOMETERS OR NAUTICAL MILES? <K OR M>";R$:PRINT
399 IF INSTR("KM",R$)=0 THEN BEEP:GOTO 398
400 CLS:LOCATE 15,25:PRINT"PLEASE WAIT, INITIALIZING !":KB=1
401 IF DA>DA1 THEN LPRINT CHR$(12):GOTO 34
402 FMU=398601.49#
403 AE=6378.135#
404 FI=298.26#
405 WE=.00007292115146#
406 XJ(2)=.001082549#
407 XJ(3)=-.000002435#
408 PI=3.1415926536#
410 RA=PI/180#
412 E2=(2*FI-1)/(FI*FI)
414 ST(1)=(SC(1)+SC(2)/60+SC(3)/3600)*RA
415 ST(2)=(SC(4)+SC(5)/60+SC(6)/3600)*RA
416 H=SC(7)/1000
417 D1=(SC(8)/3600)*RA
418 D2=(SC(9)/3600)*RA
421 GOSUB 578
423 OJNUM=MES(1)
424 DAT(1)=MES(2)
425 DAT(2)=MES(3)
426 DAT(17)=MES(4)
427 DAT(18)=MES(5)
428 DAT(7)=MES(6)
429 DAT(12)=MES(7)
430 DAT(6)=MES(8)
431 DAT(9)=MES(9)
432 DAT(15)=MES(10)
433 DAT(16)=MES(11)
434 DAT(22)=MES(12)
436 GOSUB 628
438 REVL=-1
440 IPIP=0
442 IX=INT(DA)
443 IY=INT(IX/1000)
444 ID=INT(IX-IY*1000)
445 FF=365*IY+(IY-1)/4#+ID+15019#
447 FJD=FF+2400000.5#
449 GOSUB 697
450 TH=TH*RA
454 IF KA=1 GOTO 457
455 IF DT<1 THEN DT=1
456 DT=DT/86400!
457 TD=0
459 DL=(FF-DAT(1))+(TD-DAT(2))
461 GOSUB 714
462 X(1)=X(1)*AE
464 GOSUB 755
466 IF IPIP=0 THEN 472
468 GOSUB 849
469 FOR I=1 TO 6
470 X(I)=X(I)+G(I)
471 NEXT
472 SS=TD*86400!
474 T1=TH+WE*SS
475 Z=T1
476 GOSUB 1069
477 T2=Z2
478 Z=T1
479 GOSUB 1072
480 T3=Z2
482 EF(1)=X(1)*T2+X(2)*T3
483 EF(2)=-X(1)*T3+X(2)*T2
484 EF(3)=X(3)
486 FOR I=1 TO 3
487 DJ(I)=EF(I)-DIR(9+I)
488 NEXT
489 FOR I=1 TO 3
490 U(I)=0
491 FOR J=1 TO 3
492 K=I+3*(J-1)
493 U(I)=U(I)+DIR(K)*DJ(J)
494 NEXT J
495 NEXT I
496 U=( ATN(U(3)/SQR(U(1)*U(1)+U(2)*U(2))))*180#/PI
497 IF S9=0 GOTO 499
498 II=(U-II)/(S9*86400!)
499 IF ABS(II)<.015 THEN II=.015
500 IF U(3)<0 THEN G=0
501 IF U(3)<0 THEN GG=0
502 PRINT"U(3)=" U(3),"REV=" REV,,"EL=" U
504 IF U(3)<-10 GOTO 540
505 IF IPIP<>0 THEN 508
506 IPIP=1
507 GOTO 468
508 IF U(3)<0 GOTO 540
510 Z=U(1)*U(1)+U(2)*U(2)
511 X2=Z
512 GOSUB 1118
513 XY=Z3
514 Z=X2+U(3)*U(3)
515 GOSUB 1118
516 RC=Z3
517 IF R$="M" THEN RC=RC/1.8483128#
518 IF R$="M" THEN PRINT"RANGE=" RC;"NM"
519 IF R$="K" THEN PRINT"RANGE=" RC;"KM"
520 Z=U(1)/U(2)
521 GOSUB 1093
522 AC=Z2*180#/PI
523 IF U(1)<0 AND U(2)>0 THEN AC=AC+360
524 IF U(1)<0 AND U(2)<0 THEN AC=AC+180
525 IF U(1)>0 AND U(2)<0 THEN AC=AC+180
526 PRINT"AZ=" AC;"DEG"
527 Z=U(3)/XY
528 GOSUB 1093
529 EC=Z2*180#/PI
530 PRINT"EL=" EC;"DEG"
531 IF EC>0 THEN GG=GG+1
532 TP=SS+.0001
533 IHR=INT(TP/3600)
534 MIN=INT((TP-3600*IHR)/60)
535 SEC=INT(TP-3600*IHR-60*MIN)
536 PRINT IHR":" MIN":" SEC;" ZULU":PRINT
538 GOSUB 1003
540 IF U(3)<-10 THEN IPIP=0
542 IF IPIP<>0 GOTO 559
544 XP=X(4)-WE*X(2)
545 XQ=X(5)+WE*X(1)
546 EF(4)=XP*T2+XQ*T3
547 EF(5)=-XP*T3+XQ*T2
548 EF(6)=X(6)
549 WD=DIR(3)*EF(4)+DIR(6)*EF(5)+DIR(9)*EF(6)
550 PRINT"WD=" WD:PRINT
552 IF U(3)<0 AND WD>0 THEN DB=( ABS(U/II)/3)/86400!:IF DB>DT THEN TD=TD+DB: GOTO 559
553 IF WD>0 GOTO 559
555 DB=.5/DAT(16)
556 IK=INT((DB-DT)/DT)
557 IF IK<=0 GOTO 559
558 TD=TD+DT*IK
559 TD=TD+DT
560 IF TD=DT THEN S9=DT ELSE S9=TD-S8
561 S8=TD
562 II=U
563 IF TD>1! THEN DA=DA+1:DT=DT1:GOTO 401
564 GOTO 459
578 AE=6378.135#
579 FI=298.26#
580 E2=(2*FI-1)/(FI*FI)
581 Z=ST(1)
582 GOSUB 1072
583 DIR(9)=Z2
584 Z=1-E2*DIR(9)*DIR(9)
585 GOSUB 1118
586 VO=AE/Z3
587 Z=ST(1)
588 GOSUB 1069
589 DIR(8)=Z2
590 TE=(VO+H)*DIR(8)
591 Z=ST(2)
592 GOSUB 1072
593 DIR(1)=-Z2
594 Z=ST(2)
595 GOSUB 1069
596 DIR(4)=Z2
597 DIR(10)=TE*DIR(4)
598 DIR(11)=-TE*DIR(1)
599 DIR(12)=((1-E2)*VO+H)*DIR(9)
600 AL=ST(2)+D2/DIR(8)
601 PH=ST(1)+D1
602 Z=PH
603 GOSUB 1069
604 DIR(8)=Z2
605 Z=AL
606 GOSUB 1072
607 DIR(1)=-Z2
608 Z=AL
609 GOSUB 1069
610 DIR(4)=Z2
611 Z=PH
612 GOSUB 1072
613 DIR(9)=Z2
614 DIR(7)=0
615 DIR(2)=-DIR(9)*DIR(4)
616 DIR(5)=DIR(9)*DIR(1)
617 DIR(3)=DIR(8)*DIR(4)
618 DIR(6)=-DIR(8)*DIR(1)
619 RETURN
628 YY=.3333333333333333#
629 FM=398601.49#
630 AE=6378.135#
631 XJ=.001082549#
632 PI=3.1415926536#
633 XM=FM*((86400!/(2*PI))*(86400!/(2*PI)))/(AE*AE*AE)
634 DR=180/PI'CONVERT DEGREES TO RADIANS
636 IX=INT(DAT(1)+.1)
637 IY=INT(IX/1000)
638 ID=INT(IX-IY*1000)
639 DAT(1)=365*IY+(IY-1)/4+ID+15019
641 Z=(XM/(DAT(16)*DAT(16)))
642 GOSUB 1031
643 Z=Z2*YY
644 GOSUB 1053
645 AA=Z2
646 IF DAT(16)<0 THEN AA=-DAT(16)
647 R7=DAT(7)/DR
648 Z=1-DAT(6)*DAT(6)
649 GOSUB 1031
650 Z=Z2*3
651 GOSUB 1053
652 Z=Z2
653 GOSUB 1118
654 DD=-1.5*XJ*(1/AA)*(1/AA)/Z3
655 Z=R7
656 GOSUB 1072
657 DD=DD*(1-1.5*Z2*Z2)
658 DAT(3)=AA*(1+YY*DD-(YY*DD)*(YY*DD))
659 IF DAT(16)>0 THEN GOTO 665
660 DAT(3)=AA
661 Z=XM/(DAT(3)*DAT(3)*DAT(3))*(1+DD)
662 GOSUB 1118
663 DAT(16)=Z3
665 Z=1/(DAT(3)*(1-DAT(6)*DAT(6)))
666 GOSUB 1031
667 Z=2*Z2
668 GOSUB 1053
669 TEMP=1.5*XJ*Z2*DAT(16)
670 Z=R7
671 GOSUB 1069
672 DAT(13)=-TEMP*Z2
674 Z=R7
675 GOSUB 1072
676 DAT(10)=TEMP*(2-2.5*Z2*Z2)
678 DAT(20)=-4#/3#*((1-DAT(6))/DAT(16))*DAT(17)
680 DAT(4)=-4#/3#*DAT(3)/DAT(16)*DAT(17)
682 DAT(5)=2*DAT(3)/DAT(16)*(10#/(9#*DAT(16))*DAT(17)*DAT(17)-DAT(18))
684 DAT(14)=((DAT(13)/DAT(16))*((14#/3#)*DAT(17)-(16#/3#)*(DAT(6)/(1+DAT(6)))*DAT(17)))/2#
686 DAT(11)=DAT(10)/DAT(16)*DAT(17)*(1+4#/3#*(1-DAT(6))/(1+DAT(6)))
688 DAT(10)=DAT(10)*360
689 DAT(11)=DAT(11)*360
690 DAT(13)=DAT(13)*360
691 DAT(14)=DAT(14)*360
692 RETURN
697 D=FJD-2433282.5#
698 I=INT(D/365)
699 TH=100.0755426#-360*I+(2.9015D-13*D+.985647346#)*D
700 IF TH<0 THEN TH=TH+360
701 IF TH>360 THEN TH=TH-360
702 RETURN
714 DL(2)=DL*DL
715 DL(3)=DL(2)*DL
716 A=DAT(3)+DL*DAT(4)+DL(2)*DAT(5)
717 E=1-(DAT(3)*(1-DAT(6)))/A
718 FI=DAT(7)
719 DF=DL*DAT(10)+DL(2)*DAT(11)
720 FO=DAT(9)+DF
721 FO=FO-( INT(FO/360)*360)
722 IF FO<0 THEN FO=FO+360
723 FQ=DAT(12)+DL*DAT(13)+DL(2)*DAT(14)
724 FQ=FQ-( INT(FQ/360)*360)
725 IF FQ <0 THEN FQ =FQ +360
726 DF(2)=DL*DAT(16)+DL(2)*DAT(17)+DL(3)*DAT(18)
727 IC=INT(DF(2))
728 FM=DAT(15)+360*(DF(2)-IC)
729 FM=FM-( INT(FM/360)*360)
730 IF FM<0 THEN FM=FM+360
731 X(1)=A
732 X(2)=E
733 X(3)=FI
734 X(4)=FO
735 X(5)=FQ
736 X(6)=FM
738 IREV=INT(DAT(22)+.01)
739 ALAT=DAT(9)+DAT(15)
740 ALAT=ALAT-( INT(ALAT/360)*360)
742 IF ALAT>359 THEN IREV=IREV-1
743 REV=IREV+ALAT/360
745 DREV=(DF/360)+DF(2)
746 REV=REV+DREV
748 REV=INT(REV*10)/10
749 RETURN
755 FMU=398601.49#
756 PI=3.1415926536#
757 C=180/PI
758 PI(2)=2*PI
759 A=X(1)
760 EE=X(2)
761 IF EE-1>=0 THEN 840
762 XI=X(3)/C
763 O=X(4)/C
764 XN=X(5)/C
765 XM=X(6)/C
766 IF XM>PI THEN XM=XM-PI(2)
767 Z=FMU
768 GOSUB 1118
769 SQM=Z3
770 EP=XM
771 J=1
772 Z=EP
773 GOSUB 1072
774 B=-Z2*EE+EP-XM
775 Z=EP
776 GOSUB 1069
777 B1=-Z2*EE+1
778 E=EP-(B/B1)
779 IF (ABS(E-EP)-.0000000001#)<0 THEN 783
780 EP=E
781 J=J+1
782 GOTO 772
783 Z=E
784 GOSUB 1069
785 XO=A*(Z2-EE)
786 Z=E
787 GOSUB 1072
788 YO=A*Z2
789 Z=(1-EE*EE)
790 GOSUB 1118
791 B=Z3
792 YO=YO*Z3
793 Z=E
794 GOSUB 1069
795 CSE=Z2
796 Z=E
797 GOSUB 1072
798 XD=SQM*Z2
799 Z=A
800 GOSUB 1118
801 B=Z3
802 B=B*(1-EE*CSE)
803 XD=-XD/B
804 Z=1-EE*EE
805 GOSUB 1118
806 YD=Z3*SQM*CSE
807 Z=A
808 GOSUB 1118
809 YD=YD/(Z3*(1-EE*CSE))
810 Z=O
811 GOSUB 1069
812 CO=Z2
813 Z=XN
814 GOSUB 1069
815 CN=Z2
816 Z=O
817 GOSUB 1072
818 SO=Z2
819 Z=XI
820 GOSUB 1069
821 CI=Z2
822 Z=XN
823 GOSUB 1072
824 SN=Z2
825 PX=CO*CN-SO*SN*CI
826 AX=-SO*CN-CO*SN*CI
827 PY=CO*SN+SO*CN*CI
828 AY=-SO*SN+CO*CN*CI
829 Z=XI
830 GOSUB 1072
831 PZ=SO*Z2
832 AZ=CO*Z2
833 X(1)=XO*PX+YO*AX
834 X(2)=XO*PY+YO*AY
835 X(3)=XO*PZ+YO*AZ
836 X(4)=XD*PX+YD*AX
837 X(5)=XD*PY+YD*AY
838 X(6)=XD*PZ+YD*AZ
839 GOTO 843
840 FOR I=1 TO 6
841 X(I)=0
842 NEXT
843 RETURN
849 AE=6378.135#
850 FMU=398601.49#
851 XJ(2)=.001082549#
852 XJ(3)=-.000002435#
853 FOR K=1 TO 6
854 Y(K)=X(K)
855 NEXT
856 Z=FMU
857 GOSUB 1118
858 SMU=Z3
860 Z=Y(1)*Y(1)+Y(2)*Y(2)+Y(3)*Y(3)
861 GOSUB 1118
862 RR=Z3
864 V2=Y(4)*Y(4)+Y(5)*Y(5)+Y(6)*Y(6)
865 AV=(2*FMU-RR*V2)/(FMU*RR)
866 IF AV<=0 GOTO 978
867 HX=Y(2)*Y(6)-Y(5)*Y(3)
868 HY=-Y(1)*Y(6)+Y(4)*Y(3)
869 HZ=Y(1)*Y(5)-Y(4)*Y(2)
870 H1=HX*HX+HY*HY
871 H2=H1+HZ*HZ
872 Z=H2
873 GOSUB 1118
874 H3=Z3
876 Z=H1
877 GOSUB 1118
878 SI(1)=Z3/H3
879 IF SI(1)<.00017 GOTO 978
880 CO(1)=HZ/H3
881 SI(2)=H3*SI(1)
883 SI(3)=HX/SI(2)
884 CO(2)=-HY/SI(2)
886 SI(4)=Y(3)/(RR*SI(1))
887 CO(3)=(-Y(1)*HY+Y(2)*HX)/(RR*SI(2))
888 SI(5)=2*SI(4)*CO(3)
889 CO(4)=1-2*SI(4)*SI(4)
890 RD=Y(1)*Y(4)+Y(2)*Y(5)+Y(3)*Y(6)
892 RA=RD/RR
893 SI(6)=RA*H3/FMU
895 P=H2/FMU
896 Z=P
897 GOSUB 1118
898 SQP=Z3
899 CO(5)=(P/RR)-1
900 OP=1+CO(5)
902 RV=SMU*OP/SQP
904 E2=SI(6)*SI(6)+CO(5)*CO(5)
905 IF E2>1 GOTO 978
906 Z=1-E2
907 GOSUB 1118
908 ETA=Z3
910 SV=(SI(6)/OP)*((ETA+OP)/(1+ETA))
911 IF ABS(SV)>1 GOTO 981
912 Z=-SV*SV+1
913 GOSUB 1118
914 Z=SV/Z3
915 GOSUB 1093
916 VMM=Z2+ETA*SI(6)/OP
918 SI(7)=SI(1)*SI(1)
919 CO(6)=CO(1)*CO(1)
920 SI(8)=1-3*CO(6)
921 PEE=P/AE
922 A1=.25*XJ(2)/(PEE*PEE)
923 A2=A1*SMU/SQP
924 EV(2)=CO(5)*SI(5)-SI(6)*CO(4)
925 EV(3)=CO(5)*CO(4)+SI(6)*SI(5)
926 EV(4)=CO(5)*SI(5)+SI(6)*CO(4)
927 EV(5)=CO(5)*CO(4)-SI(6)*SI(5)
928 DR=A1*P*(SI(7)*CO(4)+SI(8)*(1-1*ETA/OP+CO(5)/(1+ETA)))
929 TEMP=OP*OP
930 DD(1)=-A2*(2*SI(7)*TEMP*SI(5)+SI(8)*SI(6)*(-.5*ETA+TEMP/(1+ETA)))
931 DD(2)=SI(7)*(2*CO(4)+2*EV(3)+CO(5)*CO(4))
932 DD(2)=DD(2)-SI(8)*(1.5+CO(5)*((2+ETA)/(1+ETA))+.5*(E2-2*SI(6)*SI(6))/(1+ETA))
933 DD(2)=DD(2)*A1*RV
934 DI=A1*SI(1)*CO(1)*(3*(CO(4)+EV(3))+EV(5))
935 DN=-A1*CO(1)*(6*(VMM+SI(6))-3*(SI(5)+EV(2))-EV(4))
936 DU=6*(1-5*CO(6))*VMM+4*(1-6*CO(6)+SI(8)/(1+ETA))*SI(6)
937 DU=DU+SI(8)*2*SI(6)*CO(5)/(1+ETA)+2*(5*CO(6)-2)*EV(2)
938 DU=DU+(7*CO(6)-1)*SI(5)+2*CO(6)*EV(4)
939 DU=-.5*A1*DU
941 XU=CO(3)*CO(2)-SI(4)*SI(3)*CO(1)
942 YU=CO(3)*SI(3)+SI(4)*CO(2)*CO(1)
943 ZU=SI(4)*SI(1)
944 XV=-SI(4)*CO(2)-CO(3)*SI(3)*CO(1)
945 YV=-SI(4)*SI(3)+CO(3)*CO(2)*CO(1)
946 ZV=CO(3)*SI(1)
947 XW=SI(3)*SI(1)
948 YW=-CO(2)*SI(1)
949 ZW=CO(1)
950 TEMP=DU+CO(1)*DN
951 TM=SI(4)*DI-CO(3)*SI(1)*DN
952 DS(1)=DR*XU+RR*(TEMP*XV+TM*XW)
953 DS(2)=DR*YU+RR*(TEMP*YV+TM*YW)
954 DS(3)=DR*ZU+RR*(TEMP*ZV+TM*ZW)
955 TC=DD(1)-RV*TEMP
956 TG=DD(2)+RA*TEMP
957 TE=RA*TM+RV*(CO(3)*DI+SI(4)*SI(1)*DN)
958 DS(4)=TC*XU+TG*XV+TE*XW
959 DS(5)=TC*YU+TG*YV+TE*YW
960 DS(6)=TC*ZU+TG*ZV+TE*ZW
962 A2=.5*XJ(3)/(XJ(2)*PEE)
963 ES=SI(4)*CO(5)-CO(3)*SI(6)
964 TA=SI(1)*OP*(A2*SI(4))
965 TB=SI(1)*(A2*(1+OP)*CO(3))
966 TC=CO(1)*(A2*CO(5))
967 TG=-SI(1)*OP*(A2*CO(3))
968 TE=-SI(1)*(A2*(SI(4)+ES))
969 TF=-CO(1)*(A2*SI(6))
970 D(1)=RR*(TA*XU+TB*XV+TC*XW)
971 D(2)=RR*(TA*YU+TB*YV+TC*YW)
972 D(3)=RR*(TA*ZU+TB*ZV+TC*ZW)
973 TM=SMU/SQP
974 D(4)=TM*(TG*XU+TE*XV+TF*XW)
975 D(5)=TM*(TG*YU+TE*YV+TF*YW)
976 D(6)=TM*(TG*ZU+TE*ZV+TF*ZW)
977 GOTO 981
978 FOR K=1 TO 6
979 DS(K)=0
980 NEXT
981 FOR K=1 TO 6
982 G(K)=DS(K)+D(K)
983 NEXT
984 RETURN
1003 I$="#####.###"
1004 IF KB=1 THEN LPRINT:LPRINT TAB(10)"STATION= "B$(AQ!):LPRINT TAB(10)"LAT="SC(1);"DEG.,";SC(2);"MIN.,";SC(3);"SEC":LPRINT TAB(10)"LONG="SC(4);"DEG.,";SC(5);"MIN.,";SC(6);"SEC":LPRINT TAB(10)"HEIGHT="SC(7);"METERS":LPRINT TAB(10)"DEF(M)="SC(8);"DEG"
1005 IF KB=1 THEN LPRINT TAB(10)"DEF(P)="SC(9);"DEG":LPRINT
1006 IF KB=1 THEN LPRINT TAB(10)"OBJ#="MES(1);"/";NA$:LPRINT TAB(10)"MJD="MES(2):LPRINT TAB(10)"FJD="MES(3):LPRINT TAB(10)"FDMM="MES(4):LPRINT TAB(10)"SDMM="MES(5):LPRINT TAB(10)"INC="MES(6):LPRINT TAB(10)"RAN="MES(7):LPRINT TAB(10)"ECC="MES(8)
1007 IF KB=1 THEN LPRINT TAB(10)"AP="MES(9)
1008 IF KB=1 THEN LPRINT TAB(10)"MA="MES(10):LPRINT TAB(10)"MM="MES(11): LPRINT TAB(10)"REV="MES(12):LC1=20
1009 KB=0
1010 IF GG=1 THEN LPRINT:LPRINT TAB(10)"STATION ";B$(AQ!):LPRINT TAB(10)"OBJECT";OJNUM;"/";NA$:LPRINT TAB(10)"DATE DOY" ID" YEAR" IY:LPRINT TAB(10)"REV" INT(REV)
1011 IF GG=1 AND R$="M" THEN LPRINT TAB(10)"TIME(GMT) AZ(DEG) EL(DEG) RANGE(NM)":LC1=LC1+6
1012 IF GG=1 AND R$="K" THEN LPRINT TAB(10)"TIME(GMT) AZ(DEG) EL(DEG) RANGE(KM)":LC1=LC1+6
1013 'FORMAT TIME
1014 AA$=STR$(IHR)
1015 IF LEN(AA$)<>3 THEN AA$="0" +RIGHT$(AA$,1)
1016 BB$=STR$(MIN)
1017 IF LEN(BB$)<>3 THEN BB$="0" +RIGHT$(BB$,1)
1018 CC$=STR$(SEC)
1019 IF LEN(CC$)<>3 THEN CC$="0" +RIGHT$(CC$,1)
1020 DD$=":"
1021 EE$=RIGHT$(AA$,2)+DD$+RIGHT$(BB$,2)+DD$+RIGHT$(CC$,2)
1022 LPRINT TAB(10)EE$;
1023 LPRINT TAB(20); USING I$; AC;
1024 LPRINT TAB(29); USING I$; EC;
1025 LPRINT TAB(41); USING I$; RC
1026 EE$="":LC1=LC1+1
1027 IF LC1>53 THEN LC1=0:LPRINT CHR$(12)
1028 RETURN
1031 Z2=LOG(Z)
1032 I0=0
1033 I2=SGN(Z2)
1034 IF I2<0 THEN Z=1/Z
1035 IF Z<1.065 THEN 1040
1036 GOSUB 1118
1037 Z=Z3
1038 I0=I0+1
1039 GOTO 1035
1040 Z=(Z-1)/(Z+1)
1041 Z2=Z*Z
1042 Z3=Z
1043 I3=9
1044 GOSUB 1131
1045 Z=Z+Z
1046 IF I0=0 THEN 1050
1047 FOR I=1 TO I0
1048 Z=Z+Z
1049 NEXT
1050 Z2=Z*I2
1051 RETURN
1053 Z2=EXP(ABS(Z))
1054 I0=0
1055 IF Z*Z<.004 THEN 1059
1056 Z=Z/2
1057 I0=I0+1
1058 GOTO 1055
1059 Z2=1
1060 FOR I2=8 TO 1 STEP -1
1061 Z2=Z2*Z/I2+1
1062 NEXT
1063 IF I0=0 THEN 1067
1064 FOR I=1 TO I0
1065 Z2=Z2*Z2
1066 NEXT
1067 RETURN
1069 GOSUB 1123 'COS
1070 Z=Z9-Z
1072 GOSUB 1123 'SIN
1073 I0=0
1074 I2=SGN(Z)
1075 Z2=Z9+Z9
1076 Z=ABS(Z)
1077 Z=Z-INT(Z/(Z2+Z2))*(Z2+Z2)
1078 IF Z>Z2 THEN Z=Z-Z2: I2=-I2
1079 IF Z>Z9 THEN Z=Z2-Z
1080 IF ABS(Z)<.063 THEN 1084
1081 Z=Z/3
1082 I0=I0+1
1083 GOTO 1080
1084 Z2=-Z*Z
1085 Z2=(((Z2/42+1)*Z2/20+1)*Z2/6+1)*Z
1086 IF I0=0 THEN 1090
1087 FOR I=1 TO I0
1088 Z2=(3-4*Z2*Z2)*Z2
1089 NEXT
1090 Z2=Z2*I2
1091 RETURN
1093 GOSUB 1123
1094 I0=0
1095 I1=0
1096 I2=SGN(Z)
1097 Z=ABS(Z)
1098 IF Z>1 THEN Z=1/Z: I1=1
1099 IF Z<.077 THEN 1106
1100 Z2=Z
1101 Z=Z*Z+1
1102 GOSUB 1118
1103 Z=Z2/(Z3+1)
1104 I0=I0+1
1105 GOTO 1099
1106 Z3=Z
1107 I3=-11
1108 GOSUB 1131
1109 IF I0=0 THEN GOTO 1113
1110 FOR I=1 TO I0
1111 Z=Z+Z
1112 NEXT
1113 Z2=Z
1114 IF I1=1 THEN Z2=Z9-Z2
1115 Z2=Z2*I2
1116 RETURN
1118 Z3=SQR(Z)
1119 Z3=(Z3+Z/Z3)/2
1120 Z3=(Z3+Z/Z3)/2
1121 RETURN
1123 IF Z9<>0 THEN RETURN
1124 Z4=Z
1125 Z=1
1126 GOSUB 1094
1127 Z9=Z2+Z2
1128 Z=Z4
1129 RETURN
1131 Z2=Z*Z
1132 FOR I=3 TO ABS(I3) STEP 2
1133 Z3=SGN(I3)*Z3*Z2
1134 Z=Z+Z3/I
1135 NEXT
1136 RETURN