|
发表于 2011-12-13 17:05:11
|
显示全部楼层
sptest.c
/************************************************************************/
/* SPTEST.FOR */
/* SIGNAL PROCESSING ALGORITHMS SUBPROGRAM TESTS */
/* Source code in C */
/************************************************************************/
/* This program tests the subroutines and functions in SIGNAL PROCESSING */
/* ALGORITHMS, Appendix A1. In each test the message "passed" or */
/* "failed" is printed after the name of the routine by the spout */
/* subroutine at the end of this program. */
/* Each test checks for correct performance for a specific input, not for */
/* all inputs, so the test is a check rather than a guarantee that the */
/* routine is working correctly. */
/* A performance factor, Q, is computed as a function of the subroutine */
/* output and compared with its correct value in the "spout" */
/* statement. For example, the correct value of Q in the test of the */
/* SPFFTR subroutine is 8389.506. A check sum of the data arrays in this */
/* program is also computed, to assure that they remain intact. */
/* If a test fails, check the listings of both the subroutine and this */
/* program against those in Appendix B1 of SIGNAL PROCESSING ALGORITHMS. */
/* If the listings agree, make sure your compiler meets the C */
/* standard. Next, try printing the float value of Q for this test. */
/* There may be a roundoff error. If all else fails to yield a reason */
/* for the failure, call John M.A. Salas at a reasonable hour. */ |
|