Category : Pascal Source Code
Archive   : PIBSIGS.ZIP
Filename : TESTINVN.PAS
(* TestInvN --- Test inverse normal *)
(*--------------------------------------------------------------------------*)
PROGRAM TestInvN;
(*--------------------------------------------------------------------------*)
(* *)
(* Program: TestInvN *)
(* *)
(* Purpose: Demonstrate inverse normal routine in PIBSIGS *)
(* *)
(* Usage: This program prompts for a tail probability value. *) )
(* It computes and prints the corresponding percentage point *)
(* of the normal distribution. *)
(* *)
(* To stop the program, enter a negative p-value. *)
(* *)
(* Calls: Ninv2 *)
(* *)
(*--------------------------------------------------------------------------*)
VAR
Z: REAL;
P: REAL;
Done: BOOLEAN;
(*$I SIGCONST.PAS *)
(*$I ERF.PAS *)
(*$I SIGNORM.PAS *)
(*$I NINV.PAS *)
(*$I NINV2.PAS *)
BEGIN (* TestInvN *)
Done := FALSE;
ClrScr;
REPEAT
WRITE('Enter tail probability: ');
READLN( P );
IF ( P > 0.0 ) THEN
BEGIN
Z := Ninv2( P );
WRITELN('Normal distribution percentage point = ',Z:12:5);
END
ELSE
Done := TRUE;
UNTIL Done;
END (* TestInvN *).
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/