Up \SpecFunc
{@abstract(EBK&NVS Pascal-Delphi Math Library: Real Special functions)
author: Nikolai V. Shokhirev )
author: Eugene B. Krissinel http://www.fh.huji.ac.il/~krissinel/)
created: September 09, 1991)
created: February 02, 2002)
last modified: February 02, 2003)
ŠNikolai V. Shokhirev, 2002-2003
}
unit uSpecFunc;
interface
uses
uMatTypes;
const
ln10 = 2.302585092994046; // 2.3025850929940456840179915
Gamma_Eu = 0.577215664901532860606512;
{ obsolete }
function ArcSin(x: TFloat): TFloat;
function ArcCos(X: TFloat): TFloat;
{ Hyperbolic Functions }
function ch(x: TFloat) : TFloat;
function sh(x: TFloat) : TFloat;
function th (x: TFloat): TFloat;
function arch (x: TFloat): TFloat;
function arsh (x: TFloat): TFloat;
function arth (x: TFloat): TFloat;
{ Special functions for the Real Calculations }
{ er(x) = exp(x**2)*erfc(x) }
function er(x: TFloat) : TFloat;
{ error function: 1 = erfc+erf }
function erf(x: TFloat) : TFloat;
{ complementary error function }
function erfc(x: TFloat) : TFloat;
{ Modified Bessel function }
function I0_(x: TFloat) : TFloat;
{ Modified Bessel function }
function I1_(x: TFloat) : TFloat;
{ Modified Bessel function }
function K0_(x: TFloat) : TFloat;
{ Modified Bessel function }
function K1_(x: TFloat) : TFloat;
{ fk0(x)=K0(x)+ln(x/2)*I0(x) }
function fk0_(x: TFloat) : TFloat;
{ fk1(x)=K1(x)-ln(x/2)*I1(x) }
function fk1_(x: TFloat) : TFloat;
{ Gamma-function error < 5 e-7 }
function Gamma_(x: TFloat) : TFloat;
{ Gamma-function error < 5 e-16 , x <> 0,-1,-2, .. }
function Gamma(X: TFloat): TFloat;
{ incomplete Gamma-function error < 5 e-16
GIM = Gamma(A,X) int(X < t < inf )
GIN = gamma(A,X) int(0 < t < X )
GIP = P(A,X), gamma(A,X) = P(A,X)*Gamma(A)
Gamma(A) = GIN + GIM }
procedure INCOG(A, X: TFloat; var GIN, GIM, GIP: TFloat);
{ incomplete gamma-function error < 5 e-10 }
function gammaInc(a,x: TFloat): TFloat;
{ incomplete gamma-function error < 5 e-10 gammaX(a,-x) = -gammaX(a,x) }
function gammaX(a,x: TFloat): TFloat;
{ PolyGamma(n,z) = d[n+1]ln(Gamma(z))/dz[n+1] , z > 10, 0 <= n <= 3 }
function PolyGamma(n: TInt; z: TFloat): TFloat;(*)
implementation
end.
Up \SpecFunc