function gausslegdquad( q, aii, r, ci, a, b, n, v, l ) {
	var wsum = 0.0;
	var cmm = ( b - a ) / 2.0;
	var d = ( b + a ) / 2.0;
	var j;
	for ( j = 0; j < n; j++ ) {
		if ( ROOT[ j ] === 0.0 ) {
			wsum += WEIGHT[ j ] * f26( q, d, aii, ci, r, v, l );
		} else {
			wsum += WEIGHT[ j ] *
				( f26( q, ( ROOT[ j ] * cmm ) + d, aii, ci, r, v, l ) );
		}
	}
	return cmm * wsum;
}
Evaluates a Gauss-Legendre quadrature rule.

@private
@param {number} q - quadrature point
@param {number} aii - integral bound
@param {number} r - relative error tolerance
@param {number} ci - integral upper bound
@param {number} a - lower bound of integration
@param {number} b - upper bound of integration
@param {number} n - number of quadrature points
@param {number} v - number of integration variables
@param {number} l - logarithm of the absolute value of the integral
@returns {number} integral value