A practical sieve algorithm finding prime numbers
Communications of the ACM
Programming ADA
Assembler Language Programming: The IBM System 360
Assembler Language Programming: The IBM System 360
Exact tests for two-way symmetriccontingency tables
Statistics and Computing
Hi-index | 0.00 |
The computation of the cumulative hypergeometric distribution function is of interest to many researchers who are working in the computational sciences and related areas. Presented here is a new method for computing this function that applies prime number factorization to the factorials. We also apply cancellation to the numerator and denominator to reduce the computational complexity of the initial, the tail end, or weighted probabilities to achieve maximum accuracy. The new method includes two algorithms, one using recursion and the other using iteration. These two algorithms are machine independent; precision is arbitrary, subject to storage limitation. The development of the algorithms is discussed, and some test results and the comparison of these two algorithms are given. To implement both algorithms, we use the Ada programming language that is an American National Standard Institute standardized language. The language has special features such as exception handling and tasks. Exception handling is used to make programming easier and to prevent overflow or underflow conditions during the execution of the program. Tasks are used to compute the numerator and denominator concurrently, and to maximize the possible number of integer multiplications in the numerator and denominator. All of the computations can be done on currently available machines, and the time consumed by these computations remains reasonably small.