home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
PASCAL
/
NRPAS13
/
GAMMQ.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-04-29
|
352b
|
16 lines
FUNCTION gammq(a,x: real): real;
VAR
gamser,gln: real;
BEGIN
IF ((x < 0.0) OR (a <= 0.0)) THEN BEGIN
writeln('pause in GAMMQ - invalid arguments'); readln
END;
IF (x < a+1.0) THEN BEGIN
gser(a,x,gamser,gln);
gammq := 1.0-gamser
END ELSE BEGIN
gcf(a,x,gamser,gln);
gammq := gamser
END
END;