'=========================================================================== ' Subject: MATH LIBRARY Date: 03-23-99 (21:16) ' Author: Nigel Traves Code: QB, QBasic, PDS ' Origin: tarot@ihalliwell.freeserve.co.u Packet: ALGOR.ABC '=========================================================================== ' Math library of various functions, like log, mean, etc... DEFINT A-Z:DIM SHARED K,S,B&,Z&:V1 'Created by PostIt! 7.2 SUB V1:OPEN "O",1,"MATHS.ZIP",4^6:Z&=2955:?STRING$(50,177); U"%up()%9%'%R-%_OImHzE<5xl*%%%(9%%%-%%%%rf%ymxSRgnN';,>T_^7LTI6x9 U"Za%I3wR]8ncUDVK]JqRj(?ONIL3&;_7ECp-oANfNNVAaApySZrJs]9?-[ZQ$Ek# U"^XCbl24N5H34j6_vbV;dDdKu9iU7fZ#8u7E\oxc^zZL$%vcl0G*?*i$_(vS'%Qu U">TT7>EQ^IbBg>)IpV89L8tdSKFCuaFSY-[]M7+fCAm:&hO2=)dnDmpW(f1-pT*5 U"CL5BI:3(QhI#e5f#wOXEGLu[#,EAZ$9F+I6wc#CwoYH6kO>E6GxIA*8ldDpdkXV U"msCJv9N&s83*W?G11dQ.MJQ0Cjc65tojiw.//t(%K0 U"q85#Cdw(k1J2NLJh;69]PnJ7Is37/p;>uaUD]L(uwh%Gw=WdWOdZ+h*RxU1g+50 U"cmBHC)sHQQbv9JCC,IzP3_56,jSL7JXs5^g(kP*cRj.Kpnt,GF;YAO+KdrISjYfQF<2mRXoGQn1P87)\Mm)pTEqH.;4(M U"^Hh&*7nYy.q:r1*a+Vf$/5DkdcX(2+8BCq&T:j#4BCPl0:LLA+q$pGiciT<*mFhV U";uh;=-h1Bm#$#$wf8 U"Sk8iTulViNTRH4I U"?FUa]ENba6fjbR9*LBwRI(;tY9:8XF$AkvSa;_7cuZbfCt28B7m>b$11.l)Q/s\ U"F,R1.)O\$Zk6$&ddfXT4^bmX.I?(dDFC\n;vr_L)BbsB'elE?2mr_Y(QKtnjvmT U"TG;PpnUn&w:Oz.Y3XzaOBar4D=xPOjC6qId;GOt0P9h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