Информационный сервер для программистов: Исходники со всего света. Паскальные исходники со всего света
  Powered by Поисковый сервер Яndex: Найдется ВСЁ!
На Главную Исходники Форум Информер Страны мира
   Математика    >>    mathpack
   
 
 MathPack - Compact Mathematical Function Package  A.P.Clarke . .01Tu

Пакет математических функций. Включает в себя функции: Sine-Integral, Cosine-Integral, Exponential-Integral, Bessel, Modified-Bessel, Laguerre, Complementary-Normal, Normal-Probability, Complementary-Error, Confluent-2nd-type, 2nd-Fresnel-Integral, 1st-Fresnel-Integral, 2nd-Type-Legendre-(Assc), 1st-Type-Legendre-(Assc), Hermite, Gamma, Gauss-Hypergeometric, Confluent-1st-Type, Generalized-Hyper, Cosine, Sine, Ln, Log10, Exp.
FUNCTION PACKAGE BY CLARKE AND MARWOOD. for TURBO PASCAL peak exponent 10E(+/- 38) ignore digits precision for sine,cos,exp,ln,log10



4k 
 

program mathpak; {(C) Australian Computer Society 1984} {based on paper A Compact Mathematical Function Package by A.P. Clarke and W. Marwood, The Australian Computer Journal, Vol 16, No 3, August 1984, pp 107 to 114 entered by W F McGee 1 Dec 1984} const e=1.0e4; sqrt_pi=1.772453850905; sqrt2 =1.414213562373; eul =0.577215664901; sqrt12 =3.464101615137; ln2 =0.693147180559; ln10 =2.302585092994; ln17 =2.833213344056; TERMMAX=500; type available=(sif,cif,e1f,jnf,mbif,lagf,qf,phif,erff,erfcf, chgf2f,sxf,cxf,qmnf,pmnf,hf,gmf,hgff,chgf1f,ghgff,cf,sf, expf,lf,l10f,done); string25=string[25]; var prec:real; numparm:array[available]of integer; name:array[available]of string25; sig_dig:integer; sig_dig_flag:boolean; sig_dig_real,Ubound,lngmb,gmb,mc_dig:real; x:real; {**********************************************************} function lnn(x:real):real; {natural log with zero exception} begin if x=0 then lnn:=-86 else lnn:=ln(x) {IMPLEMENTATION DEPENDENT 38*ln10} end; {***********************************************************} procedure sum_error(var1,dig1,var2,dig2:real); var error:real; begin error:=abs(var1)*(exp(-dig1*ln10)+prec) + abs(var2)*(exp(-dig2*ln10)+prec); sig_dig:=trunc(ln(abs((var1+var2)/error))/ln10) end; {**************