| Algorithm 3 Numerical Integration Algorithm, NIA | |
| Step 1. | Initialize the number of sample points K. Set and . |
| Step 2. | Set . For each , let , and for each , let . |
| Step 3. | Reset and . |
| Step 4. | If , go to Step 2. Otherwise, return H as the estimated value of . |