FNRombergestimates the integral of the function named inF$between the pointsaandb.Eps,Nmin, andNmaxcontrol when the estimating process stops.FNRombergevaluates the integral using successively more points in the function, doing at leastNminevaluations of the integral. When the difference between successive values of the integral is less thanEps, integration stops. IfFNRombergdoes more thanNmaxevaluations of the integral without successive evaluations differing by less thatEps,FNRombergstops evaluating the integral and returns MAXREAL to indicate failure to evaluate the integral.
F$should contain the name of an HTBasic subroutine. The subroutine should take two REAL parameters. It should evaluate the function to be integrated at the second parameter and return its value in the first parameter. For example, ifF$= "Test", then the subroutineTestshould begin with the definition line
SUB Test(REAL Y,X)
whereXandYmay be replaced by the names of any REAL parameters. The subroutineTestwould evaluate the desired function at the valueXand return the value inY.
Errors
FNRombergcauses an HTBasic error if the subroutine named inF$is undefined. The subroutine named inF$may also cause HTBasic Errors when it is evaluated.