ABSTRACT

Unfortunately, passing the coefficient in this way makes BISECT rather specialized. Now it is useful for problems in which the calling routine needs to send exactly one REAL*8 scalar on to FCN, but if tomorrow we need to send two values we will have to revise BISECT again. If we pass several different EXTERNAL function names into BISECT in a single program, as described in §7.2, each function might require different types and quantities of data to be set in the main program and passed on, possibly resulting in a complicated mess of extra parameters to BISECT and FCN only some of which would be used in each case. None of these complications can be tolerated in a library routine, which must be useful in the widest possible variety of situations. If BISECT were a library routine that somebody else wrote, we might not even have the source code for it and then could not change it as proposed above. Often it is necessary for a program that calls a library routine to communicate data to another subprogram that the library routine invokes, but it is impossible to modify the library routine to pass the data through.